Macro Scheduler 15

ReadLn

ReadLn>file_name,line_number,result

 

Reads the specified line from the given text file.  If line_number is past the end of the file, result will contain ##EOF##.  If the file does not exist, result is set to ##NOFILE##.  If an error occurred, result is set to ##ERR## followed by the error code.

 

Abbreviation : RLN

See also: ReadFile, WriteLn

 

Example

 

This example reads each line from the text file and displays it in a Message window.

 

Let>k=1

While>line<>##EOF##

  ReadLn>c:\temp\test.txt,k,line

  If>line<>##EOF##

    MessageModal>line

  Endif

  Let>k=k+1

EndWhile