Link to home
Start Free TrialLog in
Avatar of rosche777
rosche777

asked on

shorter form for value=~value; ?

hi,
is there a shorter form for value=~value; or value^=0xff; like i++; ?
Avatar of captainkirk
captainkirk

don't believe so...
Seems no, because you wish to modify a value.
In some function it looks shorter:
int func(int value);

func(~value);

But value stay unchanged.

ASKER CERTIFIED SOLUTION
Avatar of joe_h
joe_h

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of rosche777

ASKER

hmm.. the value must change..
a syntax like value~~; doesn't exist? :(
Only the increment and decrement operators have syntax like that - the only choices I know of are macros, function calls, and the form you posted - value ~= value.
Nope.
oke thx