HP 3000 Manuals

REC [ HP Business BASIC/XL Reference Manual ] MPE/iX 5.0 Documentation


HP Business BASIC/XL Reference Manual

REC 

The REC function returns the number of the record indicated by a file's
record pointer.

Syntax 

REC(fnum)

Parameters 

fnum             The file number by which HP Business BASIC/XL identifies
                 the file.  It is a numeric expression that evaluates to
                 a positive short integer.  An optional # can precede
                 fnum.

Examples 

     10 CREATE "File1",RECSIZE=5,FILESIZE=10 !BDATA file; 10 5-word records
     11 ASSIGN "File1" TO #1
     12 POSITION #1;BEGIN                    !Pointer at record 1.
     13 DISP REC(#1)                         !Display 1.
     14 POSITION #1;3                        !Pointer at record 3.
     15 DISP REC(#1)                         !Display 3.
     16 PRINT #1,7; 502                      !Print 502 on record 7
     18 DISP REC(#1)                         !Display 7.
     19 POSITION #1;END                      !Pointer at end of file.
     20 DISP REC(#1)
     99 END



MPE/iX 5.0 Documentation