11.04.2013 Views

UniBasic Commands Reference - Rocket Software

UniBasic Commands Reference - Rocket Software

UniBasic Commands Reference - Rocket Software

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

READSEQ<br />

Syntax<br />

READSEQ var FROM seq.file.var {THEN statements [END] | ELSE statements<br />

[END]}<br />

Description<br />

The <strong>UniBasic</strong> READSEQ command reads the next record from a sequential file and<br />

assigns the data read to a variable.<br />

Note: Before you use READSEQ, you must open the file by using the OSOPEN or<br />

OPENSEQ command.<br />

If the file is a named pipe, you cannot use READSEQ to read it. You must use the<br />

OSBREAD command.<br />

Each read from the sequential file searches for a line feed character [CHAR(10)] to<br />

determine the end of the record. READSEQ maintains a pointer to the current<br />

position in the file (where the last record terminated).<br />

Parameters<br />

The following table describes each parameter of the syntax.<br />

Parameter Description<br />

1-636 <strong>UniBasic</strong> <strong>Commands</strong> <strong>Reference</strong><br />

var Specifies a variable to which to assign the record.<br />

READSEQ Parameters

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!