home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / sys / amiga / programmer / 4857 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.7 KB

  1. Path: severus.mbfys.kun.nl!rhialto
  2. From: rhialto@mbfys.kun.nl (Olaf Seibert)
  3. Newsgroups: comp.sys.amiga.programmer
  4. Subject: Re: x ^= y ^= x ^= y;
  5. Date: 5 Mar 1996 22:10:23 GMT
  6. Organization: University of Nijmegen, The Netherlands
  7. Distribution: world
  8. Message-ID: <4hie4f$978@wn1.sci.kun.nl>
  9. 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>
  10. NNTP-Posting-Host: severus.mbfys.kun.nl
  11.  
  12. In <2099.6633T1231T2431@cs.ruu.nl> wsldanke@cs.ruu.nl (Wessel Dankers) writes:
  13. >I.e. you can't assume anything about the order in which a statement is
  14. >evaluated. So, if I write:
  15. >printf("%d", time(NULL));
  16. >my compiler could very well first print the time and then ask the system what
  17. >time it is. Interesting thought. So, if I have the right compiler I can
  18.  
  19. Fortunately this is not true. The description of a function call says
  20. that first the arguments are evaluated, then there is a sequence point,
  21. then the funtion is called. I must admit that I would have to look up
  22. what is said about the evaluation of the function to call (here it is
  23. "printf" but it could have been something complicated like
  24. "(mystruct.fpa[3 * i]->func)"):  would that be before that sequence
  25. point, after, or undefined.
  26.  
  27. >compute PI in 1,000,000,000,000 decimals in 0 seconds, and then sneekily
  28. >switch off the computer when it's about to actually calculate PI. Hmmm..
  29.  
  30. Well, if you are able to create such a compiler I bet you'll be famous ;-)
  31.  
  32. >Wessel Dankers                 _\\|//_            <wsldanke@cs.ruu.nl>
  33. -Olaf.
  34. --
  35. ___ Olaf 'Rhialto' Seibert      rhialto@mbfys.kun.nl      The only excuse
  36. \X/    for making a useless thing is that one admires it intensely. -O.W.
  37.