Skip to main content
Skip table of contents

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:
"Example ;Herbert"

The following function calls result from that:
Text = f$FileRead( FileNo, ';' )àText = 'Example '
Text = f$FileRead( FileNo, '' )àText = 'Example ;Herbert'
Text = f$FileRead( FileNo, '%' )àText = 'Example ;Herbert'

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.