Guardian Programmer's Guide

Table Of Contents
Using the Sequential Input/Output Procedures
Guardian Programmer’s Guide 421922-014
15 - 35
Handling Padding Characters
The following statements turn it back on again using SET^FILE:
LITERAL ON = 1;
.
.
CALL SET^FILE(DFILE,
SET^READ^TRIM,
ON);
In the next example, the READ^FILE call with read-trailing-blank-trimming turned off
would indicate that 24 bytes have been read (the length of the record). However,
because read trailing-blank-trimming is turned on, the READ^FILE call returns a read
count of only 16 bytes:
LITERAL ON = 1;
RECORD^LENGTH := 24;
CALL SET^FILE(DFILE,
ASSIGN^RECORDLENGTH,
RECORD^LENGTH);
CALL OPEN^FILE(COMMON^FCB,
DFILE,
!block^buffer!,
!block^bufferlen!,
!flags parameter!,
READ^TRIM);
.
.
CALL SET^FILE(DFILE,
SET^READ^TRIM,
ON);
CALL READ^FILE(DFILE,
READ^BUFFER,
BYTES^READ);
VST073.VSD