EOF
From MCS Wiki AVR
(Difference between revisions)
(Created page with "= <span class="f_Header">Action</span> = Returns the End of File Status. <span style="font-family: Arial;"> </span> <span style="font-family: Arial;"> </span> = ...") |
|||
Line 78: | Line 78: | ||
= <span class="f_Header">See also</span> = | = <span class="f_Header">See also</span> = | ||
− | [ | + | [[INITFILESYSTEM]] , [[OPEN]] , [[CLOSE]], [[FLUSH]] , [[PRINT]] , [[LINE INPUT]] , [[LOC]] , [[LOF]] , [[FREEFILE]] , [[FILEATTR]] , [[SEEK]] , [[BSAVE]] , [[BLOAD]] , [[KILL]] , [[DISKFREE]] , [[DISKSIZE]] , [[GET]] , [[PUT]] , [[FILEDATE]] , [[FILETIME]] , [[FILEDATETIME]] , [[DIR]] , [[FILELEN]] , [[WRITE]] , [[INPUT]] |
<span style="font-family: Arial;"> </span> | <span style="font-family: Arial;"> </span> |
Latest revision as of 16:25, 9 February 2013
Contents |
Action
Returns the End of File Status.
Syntax
bFileEOFStatus = EOF(#bFileNumber)
Remarks
bFileEOFStatus |
(Byte) A Byte Variable, which assigned with the EOF Status |
bFileNumber |
(Byte) Number of the opened file |
This functions returns information about the End of File Status
Return value |
Status |
0 |
NOT EOF |
255 |
EOF |
In case of an error (invalid file number) 255 (EOF) is returned too.
See also
INITFILESYSTEM , OPEN , CLOSE, FLUSH , PRINT , LINE INPUT , LOC , LOF , FREEFILE , FILEATTR , SEEK , BSAVE , BLOAD , KILL , DISKFREE , DISKSIZE , GET , PUT , FILEDATE , FILETIME , FILEDATETIME , DIR , FILELEN , WRITE , INPUT
ASM
Calls |
_FileEOF |
|
Input |
r24: Filenumber |
|
Output |
r24: EOF Status |
r25: Error code |
|
C-Flag: Set on Error |
|
Partial Example
Ff =Freefile()' get file handle Open "test.txt" For Input As #ff ' we can use a constant for the file too Print Lof(#ff); " length of file" Print Fileattr(#ff); " file mode"' should be 1 for input Do LineInput #ff , S ' read a line ' line input is used to read a line of text from a file Print S ' print on terminal emulator Loop Until Eof(#ff)<> 0 'The EOF() function returns a non-zero number when the end of the file is reached 'This way we know that there is no more data we can read Close #ff
Languages | English • Deutsch |
---|