L3DT users' wiki
Large 3D terrain generator

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

 
plugins/general/zeoscript/reference/functions/ftell.txt · Last modified: 2017/08/31 06:14 (external edit)
 
Except where otherwise noted, content on this wiki is licensed under the following license:CC Attribution-Share Alike 3.0 Unported
Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki