Please enable JavaScript to view this site.

A-Shell Development History

Navigation: Version 5.1/6.0, builds 1100-1271 > 1107 - 12 Apr 08

READ and WRITE "eXplicit" variations

Scroll Prev Top Next More

New "eXplicit" variations of READ and WRITE statements:

XREAD #CH, RECNO, VAR {,VAR2...,VARN}

XREADL #CH, RECNO, VAR {,VAR2...,VARN}

XREAD'READ'ONLY #CH, RECNO, VAR {,VAR2...,VARN}

XWRITE #CH, RECNO, VAR {,VAR2...,VARN}

XWRITEL #CH, RECNO, VAR {,VAR2...,VARN}

XWRITEN #CH, RECNO, VAR {,VAR2...,VARN}

XWRITELN #CH, RECNO, VAR {,VAR2...,VARN}

 

These are equivalent to the standard versions of these statements (without the "X" and without the RECNO variable), except that, instead of getting the record number implicitly, from the variable specified in the OPEN statement, the record number is specified, eXplicitly, in the statement.

This can be advantageous in generic or parameterized implementations of file i/o, and especially in SBX routines (which otherwise need to use MX_FLSET in order to access a file that was opened outside of the SBX.)