beautypg.com

Fpos – Visara Master Console Center Scripting Guide User Manual

Page 116

background image

Chapter 5 Script Commands

Scripting Guide

116

FPOS

Syntax:

FPOS( %FileNum) ==> %Position

Description:

Returns an open file’s current record pointer position.

Action:

The current record pointer offset position for the file represented by the

file handle FileNum is returned.

Parameters:

%FileNum. Numeric expression. The file handle obtained from

FOPEN(). The file for which to return the current record pointer
offset value.

Returns:

Numeric value. The number of bytes from the beginning of the file the

current record pointer is positioned. The beginning of the file is byte 0
on opening.

Notes:

NEWLINE is considered a character when determining the pointer

position.

Example:

%Handle := FOPEN( $FileName)
%Position := FPOS( %Handle)

See Also:

FCLOSE, FDELETE, FEXISTS, FREAD, FRENAME, FREWIND,
FWRITE