|
![]() |
#1 |
Участник
|
Еще хочу предостеречь от следующей ошибки.
В справке написано: Цитата:
READ (File)READ (File)
Use this function to read from an ASCII or binary file. [Read] := File.READ(Variable) Read Data type: integer This optional return value tells you the number of bytes read. File Data type: file Use this variable to refer to the file. Variable Data type: any The destination variable. Comments If TEXTMODE (File) is set to TRUE, the system reads a line of text from the file, evaluates it and sets the variable equal to the result. If TEXTMODE is set to FALSE, the system determines the number of bytes to read based on the size of the variable. Т.е. при попытке прочитать файл со строкой qwertyuiopqwertyuiop кодом: Код: myFile.TEXTMODE(FALSE); myFile.OPEN('C:\test.dat'); BytesRead := myFile.READ(myBufer10); MESSAGE('%1, %2, %3', BytesRead, myBufer10, MAXSTRLEN(myBufer10)); myFile.CLOSE; Цитата:
Текст 'qwertyuiopq' в READ параметр но. 1 слишком длинный.
|
|