MQL4 Reference File Functions FileReadString
|
FileReadStringThe function reads a string from the current position of a file pointer in a file.
Parameters file_handle [in] File descriptor returned by FileOpen(). length=0 [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)
See also String Type, Conversion Functions, FileWriteInteger() |