home *** CD-ROM | disk | FTP | other *** search
- Path: severus.mbfys.kun.nl!rhialto
- From: rhialto@mbfys.kun.nl (Olaf Seibert)
- Newsgroups: comp.sys.amiga.programmer
- Subject: Re: x ^= y ^= x ^= y;
- Date: 5 Mar 1996 22:10:23 GMT
- Organization: University of Nijmegen, The Netherlands
- Distribution: world
- Message-ID: <4hie4f$978@wn1.sci.kun.nl>
- References: <1286.6624T1439T237@cs.ruu.nl> <3Du8y*20g@yaps.rhein.de> <3132C4BE.2D60@cs.ruu.nl> <4h3ivp$966@hasle.sn.no> <2099.6633T1231T2431@cs.ruu.nl>
- NNTP-Posting-Host: severus.mbfys.kun.nl
-
- In <2099.6633T1231T2431@cs.ruu.nl> wsldanke@cs.ruu.nl (Wessel Dankers) writes:
- >I.e. you can't assume anything about the order in which a statement is
- >evaluated. So, if I write:
- >printf("%d", time(NULL));
- >my compiler could very well first print the time and then ask the system what
- >time it is. Interesting thought. So, if I have the right compiler I can
-
- Fortunately this is not true. The description of a function call says
- that first the arguments are evaluated, then there is a sequence point,
- then the funtion is called. I must admit that I would have to look up
- what is said about the evaluation of the function to call (here it is
- "printf" but it could have been something complicated like
- "(mystruct.fpa[3 * i]->func)"): would that be before that sequence
- point, after, or undefined.
-
- >compute PI in 1,000,000,000,000 decimals in 0 seconds, and then sneekily
- >switch off the computer when it's about to actually calculate PI. Hmmm..
-
- Well, if you are able to create such a compiler I bet you'll be famous ;-)
-
- >Wessel Dankers _\\|//_ <wsldanke@cs.ruu.nl>
- -Olaf.
- --
- ___ Olaf 'Rhialto' Seibert rhialto@mbfys.kun.nl The only excuse
- \X/ for making a useless thing is that one admires it intensely. -O.W.
-