tell (file)
A file pointer to a previously opened file. This may be either a file in the file system, or a string opened for read and write.
This function returns the current file position as an integer representing the number of characters from the beginning of the file.
Gamma> msk = open("myseekfile.dat", "r",nil); #<File:"myseekfile.dat"> Gamma> read_until(msk,"f"); "Now is the time " Gamma> tell(msk); 17 Gamma> seek(msk, 18, 1); t Gamma> tell(msk); 35 Gamma> msk = open("myseekfile3.dat", "w",nil); #<File:"myseekfile3.dat"> Gamma> write(msk,"hello"); t Gamma> tell(msk); 7 Gamma> msk = open("myseekfile3.dat", "a",nil); #<File:"myseekfile3.dat"> Gamma> write(msk,"goodbye"); t Gamma> tell(msk); 16 Gamma>
open, open_string, read, read_char, read_double, read_float, read_line, read_long, read_short, read_until, seek
Copyright © 1995-2010 by Cogent Real-Time Systems, Inc. All rights reserved.