home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #20 / NN_1992_20.iso / spool / comp / sys / mac / programm / 15537 < prev    next >
Encoding:
Internet Message Format  |  1992-09-15  |  1.2 KB

  1. Path: sparky!uunet!munnari.oz.au!uniwa!uniwa!nfm
  2. From: gurhs@uniwa.uwa.edu.au (Rhys Hollow)
  3. Newsgroups: comp.sys.mac.programmer
  4. Subject: Re: How to <<Readln>> from a text referenced by a handle??
  5. Date: 16 Sep 1992 11:23:15 +0800
  6. Organization: The University of Westrn Australia
  7. Lines: 24
  8. Message-ID: <1969b4INNpte@uniwa.uwa.edu.au>
  9. References: <1992Sep15.074458.6297@bernina.ethz.ch> <peter-160992091557@134.7.50.3>
  10. NNTP-Posting-Host: uniwa.uwa.edu.au
  11.  
  12. peter@cujo.curtin.edu.au (Peter N Lewis) gives a useful example of
  13. implementing a Readln with a handle-referenced block of text :
  14.  
  15. >{$R-}
  16.  
  17. But wait!  What is this?? Turning Rangechecking off?  I wonder what that
  18. could be for?  What's that you say?  Think Pascal will range check if
  19. you try to set the length byte of the string?  Think Pascal will range
  20. check if you access the string s[x] where x is greater than Length(s)?
  21. You're kidding right?  Think Pascal couldn't possibly be that stupid
  22. surely?  Oh dear, I think it is.
  23.  
  24. <Rhys bangs head against the wall <bang> <bang> <bang> >
  25.  
  26. >procedure ReadALine(h:handle; var s:str255);
  27. [Body of procedure deleted]
  28. >end;
  29.  
  30.  
  31. Hmm, don't forget to turn Range Checking back on Pete!
  32.  
  33. Rhys.
  34. --
  35. Rhys Hollow (gurhs@uniwa.uwa.oz.au) "ee'er by gum he's a bad'un!" -DangerMouse.
  36.