Guardian Procedure Calls Reference Manual
EDITREAD Procedure
Summary
Syntax for C Programmers
Syntax for TAL Programmers
Parameters
Returned Value
Example
Summary
The EDITREAD procedure reads text lines from an EDIT file (file code=101).
Text lines are transferred, in ascending order, from the text file to a buffer in the application
program's data area. One line is transferred by each call to EDITREAD. EDITREAD also returns the
sequence number associated with the text line and performs checks to ensure that the text file is
valid.
The EDIT file can be opened nowait. However, a call to EDITREAD completes before returning to
the application program; it is not completed with a call to AWAITIO.
NOTE: Before EDITREAD is called, a call to EDITREADINIT must complete successfully.
Syntax for C Programmers
#include <cextdecs(EDITREAD)>
short EDITREAD ( short _near *edit-controlblk
,char *buffer
,short bufferlen
,__int32_t *sequence-num );
• CEXTDECS (through the included file TNSINTH) defines 32-bit values as the typedef
__int32_t, which for TNS and TNS/R compiles is defined as long and for TNS/E compiles
is defined as int.
Syntax for TAL Programmers
status := EDITREAD ( edit-controlblk ! i,o
,buffer ! o
,bufferlen ! i
,sequence-num ); ! o
Parameters
edit-controlblk
input, output
INT:ref:*
is an uninitialized array that is declared globally. The length in words of the edit control block
must be at least 40 plus (bufferlen / 2). This control block is returned by EDITREADINIT
and should be used in each call to EDITREAD. Do not modify it between calls.
buffer
output
STRING:ref:*
is an array where the text line is to be transferred.
336 Guardian Procedure Calls (D-E)