- FileSelectDialog
- FileFindFirst
- FileFindNext
- FileFindClose
- FileIsExist
- FileOpen
- FileClose
- FileCopy
- FileDelete
- FileMove
- FileFlush
- FileGetInteger
- FileIsEnding
- FileIsLineEnding
- FileRead
- FileReadArray
- FileReadBool
- FileReadDatetime
- FileReadDouble
- FileReadFloat
- FileReadInteger
- FileReadLong
- FileReadNumber
- FileReadString
- FileReadStruct
- FileReadComplexDouble
- FileReadComplexFloat
- FileSeek
- FileSize
- FileTell
- FileWrite
- FileWriteArray
- FileWriteComplexDouble
- FileWriteComplexFloat
- FileWriteDouble
- FileWriteFloat
- FileWriteInteger
- FileWriteLong
- FileWriteString
- FileWriteStruct
- FileLoad
- FileSave
- FolderCreate
- FolderDelete
- FolderClean
FileWrite
Writing text-converted data to a CSV or TXT file; a delimiter between the data is inserted automatically if it is not equal to 0. After writing to the file, the line end character "\r\n" is added.
Writing data as is, without conversion, to a BIN file.
uint FileWrite(
|
Parameters
file_handle
[in] File descriptor returned by FileOpen().
...
[in] The list of parameters separated by commas, to write to the file. The number of parameters written to the file must not exceed 256.
Return Value
Number of bytes written.
Note
Only variables of basic types can be used as parameters; arrays, structures and classes are not allowed.
When outputting to CSV or TXT:
Numeric data are converted to text format (see the Print() function). Data of the double, float, complex, complexf types are output with 16 digits after the decimal point. Depending on which representation is more compact, data can be output in either traditional or scientific format. Complex numbers are output in the format "(<real>,<imag>)". To output real numbers with a different precision or in an explicitly specified format, use DoubleToString().
Values of the bool type are output as "true" or "false" strings.
Values of the datetime type are output in the format "YYYY.MM.DD HH:MI:SS".
When outputting to a BIN file, data are written as is, without conversion. Data of the string type are written without a terminating zero, as implemented in the FileWriteString() function.
Example:
//+------------------------------------------------------------------+
|
See also