Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C Programming > sequence points

Reply
Thread Tools

sequence points

 
 
Jrdman
Guest
Posts: n/a
 
      08-17-2008
hi

According to the standard these are how we define sequence points:


*the call to a function ,after the arguments have been evaluated

*the end of the first operand of the following operators :

{logical AND :&&

Logical OR |

Conditional ?

Comma ,


}
*the end of a full declarator


*the end of a full expression:an initializer , the expresion in an
expression statement

the controlling expression of a selection statement (if or switch)

the controlling expresion of while or do statement,eatch of the
expressions of a for statement

the expression in a return statement


*Immediatly before a library function returns


*After the actions associated with eatch formatted input/output
function conversion specifier


*Immediatly before and immediatly after eatch call to a comparison
function,and between any call to a comparison function and any
movement of the objects passed as arguments to that call

can someone explain eatch one deeply?
 
Reply With Quote
 
 
 
 
Ben Bacarisse
Guest
Posts: n/a
 
      08-17-2008
Jrdman <(E-Mail Removed)> writes:

> According to the standard these are how we define sequence points:

<snip full list of places where sequence point occur in C programs>
> can someone explain eatch one deeply?


That's asking for too much work. None of them seem particularly
confusing to me, so it would help if you said which ones are confusing
you. If it really is all of them, then you need to go back and review
some basic C terminology.

--
Ben.
 
Reply With Quote
 
 
 
 
Jrdman
Guest
Posts: n/a
 
      08-17-2008
On Aug 17, 2:52*pm, Ben Bacarisse <(E-Mail Removed)> wrote:
> Jrdman <(E-Mail Removed)> writes:
> > According to the standard these are how we define *sequence points:

>
> <snip full list of places where sequence point occur in C programs>
>
> > can someone explain eatch one deeply?

>
> That's asking for too much work. *None of them seem particularly
> confusing to me, so it would help if you said which ones are confusing
> you. *If it really is all of them, then you need to go back and review
> some basic C terminology.
>
> --
> Ben.


Just explain what you can explain (if you want a few ones of them)

 
Reply With Quote
 
osmium
Guest
Posts: n/a
 
      08-17-2008
"Jrdman" wrote:

> According to the standard these are how we define sequence points:


> *the end of the first operand of the following operators :
>
> {logical AND :&&
>
> Logical OR |


The article in the link should be helpful in this particular case, this is a
situation where other languages may differ.

http://en.wikipedia.org/wiki/Short-circuit_evaluation

I'll leave the other to people with more time on their hands.


 
Reply With Quote
 
Anand Hariharan
Guest
Posts: n/a
 
      08-17-2008
On Sun, 17 Aug 2008 07:47:06 -0700, Jrdman <(E-Mail Removed)> wrote:

> hi
>
> According to the standard these are how we define sequence points:
>

<snip>
>
> can someone explain eatch one deeply?


I know you were directed to reading the standard in the other thread, but
I now get the impression that you are probably better off reading the C
FAQ. It explains what sequence points are, how it could affect the code
you write, and gives you several examples.

http://c-faq.com/expr/seqpoints.html


- Anand

 
Reply With Quote
 
Ian Collins
Guest
Posts: n/a
 
      08-17-2008
Jrdman wrote:
> On Aug 17, 2:52 pm, Ben Bacarisse <(E-Mail Removed)> wrote:
>> Jrdman <(E-Mail Removed)> writes:
>>> According to the standard these are how we define sequence points:

>> <snip full list of places where sequence point occur in C programs>
>>
>>> can someone explain eatch one deeply?

>> That's asking for too much work. None of them seem particularly
>> confusing to me, so it would help if you said which ones are confusing
>> you. If it really is all of them, then you need to go back and review
>> some basic C terminology.
>>

>
> Just explain what you can explain (if you want a few ones of them)
>

Go back to the referenced sections, the explanations are clear.

--
Ian Collins.
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Question about sequence points spibou@gmail.com C Programming 3 08-12-2006 10:01 PM
Knowing your sequence points akarl C Programming 7 08-12-2005 02:21 AM
Does C++ have sequence points ? Timothy Madden C++ 4 09-21-2004 08:21 AM
Sequence points Dave Theese C++ 2 09-03-2003 08:16 AM
Sequence points j C Programming 4 07-24-2003 11:14 AM



Advertisments