Need a little guidance??

Please support our C advertiser: Programming Forums - DaniWeb Sister Site
Reply

Join Date: Jun 2005
Posts: 1,496
Reputation: WolfPack has a spectacular aura about WolfPack has a spectacular aura about WolfPack has a spectacular aura about 
Solved Threads: 104
Moderator
WolfPack's Avatar
WolfPack WolfPack is offline Offline
Mentally Challenged Mod.

Re: Need a little guidance??

 
0
  #11
Jul 31st, 2006
Grr.
バルサミコ酢やっぱいらへんで
Reply With Quote Quick reply to this message  
Join Date: Apr 2004
Posts: 4,386
Reputation: Dave Sinkula has a brilliant future Dave Sinkula has a brilliant future Dave Sinkula has a brilliant future Dave Sinkula has a brilliant future Dave Sinkula has a brilliant future Dave Sinkula has a brilliant future Dave Sinkula has a brilliant future Dave Sinkula has a brilliant future Dave Sinkula has a brilliant future Dave Sinkula has a brilliant future Dave Sinkula has a brilliant future 
Solved Threads: 243
Team Colleague
Dave Sinkula's Avatar
Dave Sinkula Dave Sinkula is offline Offline
long time no c

Re: Need a little guidance??

 
0
  #12
Jul 31st, 2006
Now just to be an ass I'll change my mind and reverse that last statement of mine.

No, not just to be an ass:
http://c-faq.com/expr/seqpoints.html

My question is why? Why is it a curiousity? Why not just write it without ambiguity?
"One of the methods used by statists to destroy capitalism consists in establishing controls that tie a given industry hand and foot, making it unable to solve its problems, then declaring that freedom has failed and stronger controls are necessary." --Ayn Rand
Reply With Quote Quick reply to this message  
Join Date: Jun 2005
Posts: 1,496
Reputation: WolfPack has a spectacular aura about WolfPack has a spectacular aura about WolfPack has a spectacular aura about 
Solved Threads: 104
Moderator
WolfPack's Avatar
WolfPack WolfPack is offline Offline
Mentally Challenged Mod.

Re: Need a little guidance??

 
0
  #13
Jul 31st, 2006
Originally Posted by Dave Sinkula
Now just to be an ass I'll change my mind and reverse that last statement of mine.

No, not just to be an ass:
http://c-faq.com/expr/seqpoints.html
Snarl.

Originally Posted by Dave Sinkula
My question is why? Why is it a curiousity? Why not just write it without ambiguity?
When I write code I try to be clear and without ambiguity. But I can't give a answer like that when a newbie asks something about operator call sequence. So I have to be careful on subtle points like that (especially since I am a mod). I will go through the link and see what I can make out from it.
バルサミコ酢やっぱいらへんで
Reply With Quote Quick reply to this message  
Join Date: Apr 2004
Posts: 4,386
Reputation: Dave Sinkula has a brilliant future Dave Sinkula has a brilliant future Dave Sinkula has a brilliant future Dave Sinkula has a brilliant future Dave Sinkula has a brilliant future Dave Sinkula has a brilliant future Dave Sinkula has a brilliant future Dave Sinkula has a brilliant future Dave Sinkula has a brilliant future Dave Sinkula has a brilliant future Dave Sinkula has a brilliant future 
Solved Threads: 243
Team Colleague
Dave Sinkula's Avatar
Dave Sinkula Dave Sinkula is offline Offline
long time no c

Re: Need a little guidance??

 
0
  #14
Jul 31st, 2006
Originally Posted by WolfPack
I will go through the link and see what I can make out from it.
What I got from it was this:
The sequence points listed in the C standard are:
  • at the end of the evaluation of a full expression (a full expression is an expression statement, or any other expression which is not a subexpression within any larger expression);
  • at the ||, &&, ?:, and comma operators; and
  • at a function call (after the evaluation of all the arguments, and just before the actual call).
Conspicuously missing was the assignment operator.

I still find sequence points confusing, so I do my best simply to avoid writing code that makes great use of knowing exactly where they are.
"One of the methods used by statists to destroy capitalism consists in establishing controls that tie a given industry hand and foot, making it unable to solve its problems, then declaring that freedom has failed and stronger controls are necessary." --Ayn Rand
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the C Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC