(translator=Szuwei, ChineseSource=Szuwei-20020510-12\ftell.html, EnglishSource=c:\matlabr12\help\techdoc\ref\ftell.html)
MATLAB Function Reference    
ftell

獲得檔案位置指示器的內容。

Syntax

Description

position = ftell(fid) 傳回fid所給定的檔案,其檔案位置指示器所指到的位置。而fid為一個利用fopen函數所得到的整數檔案識別碼。而position是一個非負的的整數,該整數說明了從檔案開始到檔案指定器所指定的位置距離多少個位元組。若傳回的position值為-1時,則表示您所做的查詢為失敗的;使用ferror這個函數去定義和查詢錯誤的性質。

See Also

fclose, ferror, fopen, fprintf, fread, fscanf, fseek, fwrite


 fseek full