Documentation
MQL5 ReferenceFile FunctionsFileWriteInteger 

FileWriteInteger

The function writes the value of the int parameter to a bin-file, starting from the current position of the file pointer.

uint  FileWriteInteger(
   int  file_handle         // File handle
   int  ivalue,             // Value to be written
   int  size=INT_VALUE      // Size in bytes
   );

Parameters

file_handle

[in]  File descriptor returned by FileOpen().

ivalue

[in] Integer value.

size=INT_VALUE

[in] Number of bytes (up to 4 inclusive), that should be written. The corresponding constants are provided: CHAR_VALUE=1, SHORT_VALUE=2 and INT_VALUE=4, so the function can write the integer value of char, uchar, short, ushort, int, or uint type.

Return Value

If successful the function returns the number of bytes written. The file pointer is shifted by the same number of bytes.

See also

IntegerToString, StringToInteger, Integer types