Table of Contents

ftell

Description

Get the current position in a file stream.

Function prototype

int64 ftell <voidptr:hFile>

Arguments

Name Type Comment
hFile voidptr A handle to a file, the current stream position of which is to be determined.

Return value

Example

voidptr fp
set fp <zs:fopen "c:\\test.txt" "w">
assert fp "Cannot open file!"

string s
set s "Hello!"
fwrite fp s

echo <zs:ftell fp> // write the current file position to the event log

fclose fp

… the output of which is written to the event log by echo as:

6

Comments

None.

See also