REWIND - rewind an open file.

Alternate Entry Name: .REWIN

Usage:

B:
   rewind( unit );
/* C users use C "rewind" */

Where:

unit
is the number of an open I/O unit.

Description:

REWIND resets the input/output file opened on I/O unit number "unit" to its starting position. If "unit" is open for writing, the next write will rewrite the file. If "unit" is open for reading, the next read will read the first line of the file. If executed on a "unit" which is associated with a terminal or a similarly non-resettable device, the call is ignored.

REWIND works by calling .SEEK to move to the beginning of the file.

See Also:

expl b lib .seek

Copyright © 1996, Thinkage Ltd.