Get the current position in a file stream.
int64 ftell <voidptr:hFile>
| Name | Type | Comment |
|---|---|---|
| hFile | voidptr | A handle to a file, the current stream position of which is to be determined. |
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
None.