WEOF Statement

The WEOF statement writes an End-Of-File mark at the current position of an attached magnetic tape or floppy disk.

Format

WEOF [RETURNING var]

[THEN

   statements

END] [ELSE

   statements

END]

Parameter(s)

RETURNING var

If a tape or floppy disk error occurs while using the RETURNING clause, the tape or floppy disk error is assigned to the returning variable and program control continues through the ELSE clause.

THEN statements

Executes statements if tape or floppy disk is attached and EOF is successfully written.

ELSE statements

Executes statements if tape or floppy disk is not attached, or if any error occurs.

Description

The WEOF statement writes a segment mark, the character taken as End-Of-Data (EOD), at the current position on the attached tape or floppy disk.

Example

When writing to tape, finish off all written content with:

WEOF THEN

   PRINT "TAPE WRITES SUCCESSFULLY COMPLETED"

END ELSE

   PRINT "UNABLE TO WRITE EOF; THIS TAPE WILL BE DIFFICULT TO USE."

END

See Also

Statement and Function Reference