home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #31 / NN_1992_31.iso / spool / comp / lang / pascal / 7794 < prev    next >
Encoding:
Internet Message Format  |  1993-01-02  |  861 b 

  1. Path: sparky!uunet!olivea!charnel!rat!ucselx!crash!tech
  2. From: tech@crash.cts.com (Don Bontemps)
  3. Newsgroups: comp.lang.pascal
  4. Subject: Why doesn't this cause an error?
  5. Message-ID: <1993Jan01.220029.27699@crash>
  6. Date: 2 Jan 93 06:00:29 GMT
  7. Organization: CTS Network Services (crash, ctsnet), El Cajon, CA
  8. Lines: 14
  9.  
  10. I know there is probably an easy answer to this question, but here is
  11. a portion of a routine that I am using to convert a lowercase string
  12. into an uppercase string.
  13.  
  14.  
  15.     readln(comment);
  16.     for l := 1 to length of comment do comment[l] := upcase(comment[l]);
  17.  
  18.  
  19.  
  20. If the user doesn't enter anything, this causes the length of comment to
  21. become zero and what confuses me is that this event does not cause any
  22. error whatsoever.  I would figure that "for l := 1 to 0" to cause a
  23. run-time error or some other type of error, but it doesn't.  Why not??
  24.