# WEOF

Updated: 10/14/2021, 2:20:00 PM
Created: 10/14/2021, 2:20:00 PM
Last Updated By: mikes
Read Time: 1 minute(s)

# Description

The WEOF statement allows the program to write an EOF mark on an attached tape device. It takes the general form:

WEOF {ON expression}
1

Where:

expression specifies the device channel to use and should evaluate to a numeric integer argument in the range 0-9, the default value is zero.

If the WEOF fails it then executes the statements associated with any ELSE clause. SYSTEM(0) will return the reason for the failure as follows:

1 There is no media attached to the channel
2 End of media found

A "tape" refers not only to magnetic tape devices but to any device described previously to jBASE.

If the specified channel has no assigned tape device, it enters the jBASE debugger with an appropriate message.

An example of use is as:

WEOF ON 5 ELSE
    CRT "No tape device exists for channel 5"
END
1
2
3

Go back to jBASE BASIC

Go back to Programmers' Reference Guide