[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index]
[Date Index]
[Thread Index]
[SQR-USERS Info]
[SQRUG Home Page]
Re: End-File
Hi Gary,
I look at your codes which is nothing wrong with that. The only problem I
can think is you specify record is 500 but you read it into 10 only. So you
change read record from 10 to 500 to see what happen. I think the problem
between record 500 and read into only 10 because the cursor in file at
position 500 therefore SQR assumes still more data to be read.
Clint Lu
847-559-4717
-----Original Message-----
From: Gary Joynes [mailto:gary_joynes@HOTMAIL.COM]
Sent: Monday, November 16, 1998 9:35 AM
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