455,515 Members | 1,772 Online
Need help? Post your question and get tips & solutions from a community of 455,515 IT Pros & Developers. It's quick & easy.

 P: n/a Given the expression: while (isaspace(c = *s++)) x+1; (s is an array) Does the increment to 's' occur after "x+1" is evaluated, or after the content of s is assigned to c? Is there a general rule as to when this type of increment occurs? ( I understand that the increment in "c = ++*s" occurs immediately before assignment, so my guess is the same would apply in the "after" scenerio, but not sure). thank you. Jun 1 '07 #1
9 Replies

 P: n/a On May 31, 7:29 pm, mdh

 P: n/a mdh wrote: Given the expression: while (isaspace(c = *s++)) x+1; (s is an array) Therefore, a diagnostic is required. Please -- PLEASE! -- study Section 6 of the comp.lang.c Frequently Asked Questions (FAQ) list at http://c-faq.com/ before posting such nonsense again. (Or "again-again," as it seems you are a repeat offender.) Does the increment to 's' occur after "x+1" is evaluated, or after the content of s is assigned to c? If `s' were incrementable (which you say it is not), it would be incremented before `x+1' is evaluated, and at some indeterminate time with respect to the assignment of a new value to `c'. Is there a general rule as to when this type of increment occurs? Yes: At some unspecified time after the preceding sequence point and before the following sequence point. ( I understand that the increment in "c = ++*s" occurs immediately before assignment, so my guess is the same would apply in the "after" scenerio, but not sure). You might just as well "understand" that the Moon is made of green cheese. There is *no* temporal relationship between the incrementing of `*s' and the assignment of a new value to `c'. Both occur after the preceding sequence point and before the next sequence point, but they may occur in any order with respect to each other -- even simultaneously or overlapped in time so the notions of "before" and "after" are meaningless. If you "understand" some more specific ordering, your thoughts are of phantasms and chimeras. -- Eric Sosman es*****@acm-dot-org.invalid Jun 1 '07 #3

 P: n/a On May 31, 8:10 pm, Eric Sosman Therefore, a diagnostic is required. Please -- PLEASE! -- study Section 6 of the comp.lang.c Frequently Asked Questions (FAQ) list athttp://c-faq.com/before posting such nonsense again. > You might just as well "understand" that the Moon is made of green cheese. There is *no* temporal relationship between the incrementing of `*s' and the assignment of a new value to `c'. Eric, I am not about to bite the hand that feeds me, but I DO look at the FAQs but nowhere did I get a great explanation of the real issue that was causing the problem to come up.....ie the fact that *temporal relationships* play no role. Sometimes asking what some might consider an obviously erroneous idea, may not be that obvious to the poster. I try and post what I think not because I want to show how smart/dumb I am, but I have seen enough to know that questions like "Teach me about ++" ( and do my assignment) gets an even greater vociferous response from the clc. Anyway, thanks for your input and apologies that this was asked twice, for which I have to point a finger at Google, which has recently, once again been on the fritz ( which means there is most definitely a * temporal* relationship between posting and seeing one's message. Jun 1 '07 #4

 P: n/a On 2007-05-31 19:29:30 -0700, mdh

 P: n/a On 31 May 2007 19:29:30 -0700, mdh

 P: n/a thank you. Did you even read the answers you received to the same question two days ago? Google...google...google. Sorry...as I said, above, but not even sure if this is being sent through, so I will repeat it.. ....... apologies that this was asked twice, for which I have to point a finger at Google, which has recently, once again been on the fritz ( which means there is most definitely a * temporal* relationship between posting and seeing one's message. Jun 1 '07 #7

 P: n/a mdh wrote: > .... snip ... > Anyway, thanks for your input and apologies that this was asked twice, for which I have to point a finger at Google, which has recently, once again been on the fritz ( which means there is most definitely a * temporal* relationship between posting and seeing one's message. So get rid of google and use a newsreader and server. Thunderbird (from mozilla.com) meets the first, and if your ISP doesn't supply a news server see below. -- Some free news servers. I use teranews and gmane.

 P: n/a Clark Cox said: > You already asked this 2 days ago. Go read the responses you got then. Folks, we KNOW Google is on the blink again. Can we cut people a little slack, please, until it's sorted out? -- Richard Heathfield "Usenet is a strange place" - dmr 29/7/1999 http://www.cpax.org.uk email: rjh at the above domain, - www. Jun 1 '07 #9

 P: n/a On 2007-06-01 02:53:47 -0700, Richard Heathfield >>You already asked this 2 days ago. Go read the responses you got then. Folks, we KNOW Google is on the blink again. Can we cut people a little slack, please, until it's sorted out? All of the Google-induced repeats that I had seen up to this point were separated in time by minutes and hours, not days. -- Clark S. Cox III cl*******@gmail.com Jun 1 '07 #10