|
-
Oct 21st, 2005, 05:04 PM
#1
Thread Starter
transcendental analytic
side effects
I'm trying to get this to work:
int k=1;
assert(k^(k=0));
but it seems like the VC2003 compiler is assigning k first no matter which side i put it. When I do this however:
int k=1,j=0;
assert((j=k)^(k=0));
it evidently assigns k after evaluating the left side. Is this standard? Is there any way around it without using another variable?
Use  
writing software in C++ is like driving rivets into steel beam with a toothpick.
writing haskell makes your life easier:
reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|