[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index]
[Date Index]
[Thread Index]
[SQR-USERS Info]
[SQRUG Home Page]
Re: End-File
- Subject: Re: End-File
- From: Hee Kok Hwa <khhee@CWT.COM.SG>
- Date: Wed, 18 Nov 1998 12:59:21 +0800
Hi Gary,
I think the line
if #end-file
should be
if #end-file = 1
Regards,
KH Hee.
CWT Distribution Ltd.
Web : http://www.cwt.com.sg
> -----Original Message-----
> From: Gary Joynes [SMTP:gary_joynes@HOTMAIL.COM]
> Sent: Monday, November 16, 1998 11:35 PM
> To: Multiple recipients of list SQR-USERS
> Subject: End-File
>
> Hello,
>
> I am trying to process a text file and display it in an SQR report.
> As
> a test I created a three line text file e.g. :
>
> Line1
> Line22
> Line333
>
> I then wrote the following code to test I could iterate through the
> file:
>
> open 'c:\temp\test.txt' as 1 for-reading record=500:vary
> while 1
> read 1 into $temp:10
> if #end-file
> break
> end-if
> print $temp (+10, 10)
> end-while
> close 1
>
> This produces an infinite loop however. A few various test showed
> that
> #end-file was never set to 1 even when a string with an ascii value of
> 0
> was being read in.
>
> Has anyone any ideas?
> Apologies for a garbled last message. A slip of a mouse button.
>
> Thanks,
> Gary.
>
> ______________________________________________________
> Get Your Private, Free Email at http://www.hotmail.com