LOF/de
(→(**COPIED FROM ENGLISH PAGE**) =) |
m (→Anmerkungen) |
||
(8 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
= <span class="f_Header">Funktion</span> = | = <span class="f_Header">Funktion</span> = | ||
− | Gibt die | + | Gibt die Länge einer Datei in Bytes zurück. |
<span style="font-family: Arial;"> </span> | <span style="font-family: Arial;"> </span> | ||
Line 9: | Line 9: | ||
= <span class="f_Header">Syntax</span> = | = <span class="f_Header">Syntax</span> = | ||
− | + | LFileLength = <span class="f_Syntax">LOF</span> (#bFileNumber) | |
<span style="font-family: Arial;"> </span> | <span style="font-family: Arial;"> </span> | ||
Line 15: | Line 15: | ||
<span style="font-family: Arial;"> </span> | <span style="font-family: Arial;"> </span> | ||
− | = <span class="f_Header"> | + | = <span class="f_Header">Anmerkungen</span> = |
<div style="padding: 0px; margin: 0px 0px 0px 4px;"> | <div style="padding: 0px; margin: 0px 0px 0px 4px;"> | ||
{| width="609" cellspacing="0" cellpadding="1" border="1" style="border: 2px solid rgb(0, 0, 0); border-spacing: 0px; border-collapse: collapse;" | {| width="609" cellspacing="0" cellpadding="1" border="1" style="border: 2px solid rgb(0, 0, 0); border-spacing: 0px; border-collapse: collapse;" | ||
Line 23: | Line 23: | ||
| valign="top" width="100%" style="width: 434px; border: 1px solid rgb(0, 0, 0);" | | | valign="top" width="100%" style="width: 434px; border: 1px solid rgb(0, 0, 0);" | | ||
− | (Byte) | + | (Byte) Filenummer mit der die geöffnete Datei identifiziert wird. |
|- style="vertical-align: top;" | |- style="vertical-align: top;" | ||
Line 30: | Line 30: | ||
| valign="top" width="100%" style="width: 434px; border: 1px solid rgb(0, 0, 0);" | | | valign="top" width="100%" style="width: 434px; border: 1px solid rgb(0, 0, 0);" | | ||
− | (Long) Variable | + | (Long) Variable der die Länge der Datei zugewiesen wird (1-based) |
|} | |} | ||
Line 36: | Line 36: | ||
<span style="font-family: Arial;"> </span> | <span style="font-family: Arial;"> </span> | ||
− | + | Diese Funktion gibt die Länge einer geöffneten Datei zurück. Trat ein Fehler auf, ist der Rückgabewert 0. Überprüfen Sie den DOS-Fehler in der Variable gbDOSError. | |
− | + | ||
<span style="font-family: Arial;"> </span> | <span style="font-family: Arial;"> </span> | ||
<span style="font-family: Arial;"> </span> | <span style="font-family: Arial;"> </span> | ||
− | = <span class="f_Header"> | + | = <span class="f_Header">Siehe auch</span> = |
[[INITFILESYSTEM]] , [[OPEN]] , [[CLOSE]], [[FLUSH]] , [[PRINT]], [[LINE INPUT]], [[LOC]], [[EOF]] , [[FREEFILE]] , [[FILEATTR]] , [[SEEK]] , [[BSAVE]] , [[BLOAD]] ,[[KILL]] , [[DISKFREE]] , [[DISKSIZE]] , [[GET]] , [[PUT]] , [[FILEDATE]] , [[FILETIME]] , [[FILEDATETIME]] , [[DIR]] , [[FILELEN]] , [[WRITE]] , [[INPUT]] | [[INITFILESYSTEM]] , [[OPEN]] , [[CLOSE]], [[FLUSH]] , [[PRINT]], [[LINE INPUT]], [[LOC]], [[EOF]] , [[FREEFILE]] , [[FILEATTR]] , [[SEEK]] , [[BSAVE]] , [[BLOAD]] ,[[KILL]] , [[DISKFREE]] , [[DISKSIZE]] , [[GET]] , [[PUT]] , [[FILEDATE]] , [[FILETIME]] , [[FILEDATETIME]] , [[DIR]] , [[FILELEN]] , [[WRITE]] , [[INPUT]] | ||
Line 89: | Line 88: | ||
<span style="font-family: Arial;"> </span> | <span style="font-family: Arial;"> </span> | ||
− | = <span class="f_Header"> | + | = <span class="f_Header">Beispiel</span> = |
<br/><source lang="bascomavr"> | <br/><source lang="bascomavr"> |
Latest revision as of 16:31, 1 March 2013
Contents |
Funktion
Gibt die Länge einer Datei in Bytes zurück.
Syntax
LFileLength = LOF (#bFileNumber)
Anmerkungen
bFileNumber |
(Byte) Filenummer mit der die geöffnete Datei identifiziert wird. |
LFileLength |
(Long) Variable der die Länge der Datei zugewiesen wird (1-based) |
Diese Funktion gibt die Länge einer geöffneten Datei zurück. Trat ein Fehler auf, ist der Rückgabewert 0. Überprüfen Sie den DOS-Fehler in der Variable gbDOSError.
Siehe auch
INITFILESYSTEM , OPEN , CLOSE, FLUSH , PRINT, LINE INPUT, LOC, EOF , FREEFILE , FILEATTR , SEEK , BSAVE , BLOAD ,KILL , DISKFREE , DISKSIZE , GET , PUT , FILEDATE , FILETIME , FILEDATETIME , DIR , FILELEN , WRITE , INPUT
ASM
Calls |
_FileLOF |
|
Input |
r24: filenumber |
X: Pointer to Long-variable, which gets th result |
Output |
r25: Errorcode |
C-Flag: Set on Error |
Beispiel
'open the file in BINARY mode Open "test.biN" For Binary As #2 Put #2 , B ' write a byte Put #2 , W ' write a word Put #2 , L ' write a long Ltemp = Loc(#2)+ 1 ' get the position of the next byte Print Ltemp ;" LOC"' store the location of the file pointer Print Lof(#2);" length of file" Print Fileattr(#2);" file mode"' should be 32 for binary Put #2 , Sn ' write a single Put #2 , Stxt ' write a string Flush #2 ' flush to disk Close #2
Languages | English • Deutsch |
---|