LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Float number in CVI 7.1

Thank everyone very much for the helps. I got it now.

Jason
0 Kudos
Message 11 of 13
(1,148 Views)
menchar wrote:
"You haven't assigged the result of the f1++ to anything, so the side effect of incrementing the variable is discarded.
The result of an n++ operation is the original value. 
f2 = f1++;  // f2 = f1 + 1"

please, menchar ! wake up, drink a cup of coffee or get some sleep ! the ++ operator increments in place: a++ <= > a += 1 <=> a = a + 1
or we would write our loops as "for ( i = 0; i < value; i = i++ )", which obviously we don't.

0 Kudos
Message 12 of 13
(1,135 Views)

Dummy -

The general case of postfix and prefix operators (or any expression for that matter) when evaluated in the C programming language is to discard the result.

The ++ and -- operators are an exception, in that they're applied to lvalues only.

I like Starbucks if you're buying.

Menchar

0 Kudos
Message 13 of 13
(1,120 Views)