home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #26 / NN_1992_26.iso / spool / comp / lang / c / 16146 < prev    next >
Encoding:
Text File  |  1992-11-08  |  1.1 KB  |  31 lines

  1. Newsgroups: comp.lang.c
  2. Path: sparky!uunet!zaphod.mps.ohio-state.edu!uunet.ca!geac!r-node!pseudo!mjn
  3. From: mjn@pseudo.uucp (Murray Nesbitt)
  4. Subject: Re: Help - What Is Wrong?
  5. Organization: Private system in Toronto, ON
  6. Date: Sat, 7 Nov 1992 11:03:12 GMT
  7. Message-ID: <MJN.92Nov7030312@pseudo.uucp>
  8. In-Reply-To: hartman@ulogic.UUCP's message of 4 Nov 92 00:19:32 GMT
  9. References: <720002131.AA03045@csource.oz.au> <FISCHER.92Oct25124334@steiner.iesd.auc.dk>
  10.     <536@ulogic.UUCP>
  11. Sender: mjn@pseudo.uucp (Murray Nesbitt)
  12. Lines: 17
  13.  
  14.  
  15. hartman@ulogic.UUCP (Richard M. Hartman) writes:
  16.  
  17. >>JC>  for(idx=0;idx!=5;idx++){                                              3
  18. >>JC>    r=&address[idx];                /*AND HERE*/                        3
  19. >>
  20. >>What on earth is going on here? Why is "r" repeatdly being assigned a
  21. >>(ignored) value? 
  22. >
  23. >No we aren't.  If it were "idx < 5" we might be, but w/ "idx != 5"
  24. >we don't go through at all.  It's FALSE right off the bat.
  25.  
  26. Eh?  Unless the semantics of ``for'' have changed recently, this loop
  27. will iterate five times (barring any asynchronous access of ``idx'').
  28.  
  29. -- 
  30. Murray
  31.