# REWIND

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 REWIND statement will issue a rewind command to the device attached to the specified channel. It takes the general form:

REWIND{ON expression} THEN|ELSE statements
1

Where:

expression, if specified, should evaluate to an integer in the range 0 to 9. Default is 0.

# Note

If the statement fails to issue the rewind then any statements associated with the ELSE clause are executed. If the statement successfully issues the rewind command then the statements associated with any THEN clause are executed. Either or both of the THEN and ELSE clauses must be specified with the statement.

If the statement fails then the reason for failure can be determined via the value of SYSTEM(0) as follows:

Value Meaning
1 There is no media attached to the channel
2 An end of file mark was found

Go back  to jBASE BASIC.

Go back to Programmers' Reference Guide