|
-
w00t
Well it is a shorthand.. but its usually for one statement if's.. And generally that means that something needs to be returned:
if(toggle == 0){
toggle = 1;
} else {
toggle = 0;
}
toggle = (toggle == 0?1:0); (to change from 1 to 0, or 0 to 1)
hmm.. bad example.. you can always go toggle = !toggle but still, you get my picture.. I don think its possible (I havent tried, Im probably wrong) to do:
(blah == something ? { do(); this(); } : { do(); that(); })
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
|