Please enable JavaScript to view this site.

A-Shell Development History

New feature: special file name .NULL may be used with sequential files to open a file which is not connected to anything. For example:

OPEN #1, .NULL, OUTPUT

OPEN #2, .NULL, INPUT

 

For output, .NULL is equivalent to the device /dev/null under UNIX and NUL under Windows, i.e.any data output to the file is just discarded. For input, .NULL acts like an empty input file (returns EOF on the first input attempt).

The ability to associate an output file channel with a null device adds to the flexiblity of the PRINT #CH statement, since depending on the value of CH and what file it is associated with, the statement can output to the screen (if CH=0), a disk file, or nothing at all. But the feature is even more useful in conjunction with the new MX_FILESOCK mechanism (see next).