[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index] [Date Index] [Thread Index]
[SQR-USERS Info] [SQRUG Home Page]

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
Line2
Line3

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
                if #h = 100
                        print 'Counter blown' (10, 10)
                        break
                end-if
                read 1 into $temp:10
                if #end-file
                        print 'EOF reached' (10, 10)
                        break
                end-if
                print $temp (10, 10)
                let #h = #h + 1
        end-while
        close 1

______________________________________________________
Get Your Private, Free Email at http://www.hotmail.com