beautypg.com

Frewind, Ewind, Ewind, fwrit – Visara Master Console Center Scripting Guide User Manual

Page 119: Frewind, fwrit

background image

Chapter 5 Script Commands

Scripting Guide

119

FREWIND

Syntax:

FREWIND( %FileNum)

Description:

Moves an open file’s current record pointer to the beginning of the file.

Action:

The current record pointer for the file represented by the file handle

FileNum is repositioned to the beginning of the file. The next
FREAD() command reads the first entry in the file.

Parameters:

%FileNum. Numeric expression. The file handle obtained from
FOPEN(). The file for which to move the current record pointer.

Returns:

N/A

Notes:

Same as FSEEK( %Handle, 0).

Example:

%Handle := FOPEN( $FileName)
//FREAD() commands to advance the current record pointer
//through the data
FREWIND( %Handle) // to read from the beginning again

See Also:

FCLOSE, FEXISTS, FOPEN, FREAD, FWRITE