p = ftell(fid)
| Parameter | Description |
|---|---|
| fid | a file descriptor |
| Parameter | Description |
|---|---|
| p | an integer value: position of the file pointer as the number of characters from the beginning of the file. |
ftell returns the offset of the current byte relative to the beginning of the file associated with the named stream fid.
TXT = 'example about ftell.';
fileID = fopen([tempdir(), 'ftell.txt'],'wt');
fprintf(fileID, TXT);
p1 = ftell(fileID)
fseek(fileID, SEEK_CUR, 'bof');
p2 = ftell(fileID)
status = fclose(fileID);
| Version | Description |
|---|---|
| 1.0.0 | initial version |