Guardian Procedure Calls Reference Manual

bufferlen
input
INT:value
is the length, in bytes, of the buffer array. This specifies the maximum number of characters
in the text line that is transferred into buffer.
sequence-num
output
INT(32):ref:1
returns the sequence number multiplied by 1000, in double-word integer form, of the text line
just read.
Returned Value
INT
A status value that indicates the outcome of the call:
Indicates that the reading of the file was successful. This is the actual number of characters in the text line.
However, no more than bufferlen bytes are transferred into buffer.
>= 0
Indicates an unrecoverable error, where:< 0
End of file encountered.-1
Error occurred while reading.-2
Text file format error.-3
Sequence error. The sequence number of the line just read is less than its predecessor.-4
Checksum error. EDITREADINIT was not called or the user has altered the edit control block. (This
will not be returned if processing a reposition.)
-5
Invalid buffer address. Edit control block was not within lower half of user data stack.-6
Example
If reading the file is successful in the following example, a count of the number of bytes in the text
line returns in COUNT, the text line returns in the array LINE, and the sequence number returns in
SEQ^NUM.
COUNT := EDITREAD (CONTROL^BLOCK , LINE , LENGTH , SEQ^NUM);
EDITREAD Procedure 337