f$FileRead (f$DateiLesen)
f$FileRead (f$DateiLesen)
Read the value from a file previously opened for reading.
The file is read from the current position in the file to a specified separator. If an entire file line is read, empty text (") can be entered as the separator. If the separator is not found in the current file line, the rest or the entire file name is returned (the line end is always a separator).
The obtained value can, depending on the file format, contain empty spaces. These can be removed via, for example, the additional ePOS function p$TDV:Util:StrTrunc.
The field content is assigned to the appropriate parameter as a return.
Syntax: | FileText = f$FileRead( FileNo, Separator ) | ||
| Argument | Type | Meaning |
| FileNo | Integer | File number |
| Separator | String | Separator for individual data values, e.g. a ";". Read the entire line with ". |
Result: | String | Text read from the file | |
Example: | The next line in a file is like the following: The following function calls result from that: | ||