- FileSelectDialog
- FileFindFirst
- FileFindNext
- FileFindClose
- FileIsExist
- FileOpen
- FileClose
- FileCopy
- FileDelete
- FileMove
- FileFlush
- FileGetInteger
- FileIsEnding
- FileIsLineEnding
- FileReadArray
- FileReadBool
- FileReadDatetime
- FileReadDouble
- FileReadFloat
- FileReadInteger
- FileReadLong
- FileReadNumber
- FileReadString
- FileReadStruct
- FileSeek
- FileSize
- FileTell
- FileWrite
- FileWriteArray
- FileWriteDouble
- FileWriteFloat
- FileWriteInteger
- FileWriteLong
- FileWriteString
- FileWriteStruct
- FileLoad
- FileSave
- FolderCreate
- FolderDelete
- FolderClean
FileReadString
The function reads a string from the current position of a file pointer in a file.
string FileReadString(
|
Parameters
file_handle
[in] File descriptor returned by FileOpen().
length=-1
[in] Number of characters to read.
Return Value
Line read (string).
Note
When reading from a bin-file. the length of a string to read must be specified. When reading from a txt-file the string length is not required, and the string will be read from the current position to the line feed character "\r\n". When reading from a csv-file, the string length isn't required also, the string will be read from the current position till the nearest delimiter or till the text string end character.
If the file is opened with FILE_ANSI flag, then the line read is converted to Unicode.
Example (the file obtained after executing the example for FileWriteInteger function is used here)
//--- display the window of input parameters when launching the script
|
See also