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