PutFloat


The PutFloat method writes single precision (32 bit) floating point number sequence to file and returns number of elements actually written. File position is moved forward by the number of bytes written.
C++
long PutFloat(
  float *FloatBuffer,              // buffer that contains data
  long NumberOfElements,           // number of elements to write
  long FilePosition = -1           // position of data in file
);
BASIC
PutFloat(
  FloatBuffer As Variant,          // variant that contains data
  NumberOfElements As Long = -1,   // number of elements to write
  FilePosition As Long = -1        // position of data in file
) As Long

Parameters

FloatBuffer
C++
Pointer to buffer that contains data.
BASIC
Variant that contains data.
Variant must be of Single data type; it can be either single variable or one-dimensional array.
NumberOfElements
Number of elements in data sequence to write.
BASIC
If this parameter is -1 length of sequence is determined by the size of FloatBuffer.
FilePosition
Position in file to write data at.
If this parameter is -1 data is written at current file position.

Return Values

If the method succeeds, the return value is the number of elements actually written.
If the method fails, the return value is failure code and error code is set. Call GetError to get error code.

Remarks

BASIC
FloatBuffer can be either single variable of type Single or one-dimensional Single array, depending on how many elements are to be written. If only one element is written, FloatBuffer can be a single variable, if more than one element is to be written it must be a one-dimensional array.

See Also

GetFloat, PutBit, PutByte, PutShort, PutLong, PutDouble, PutText, PutUnicodeText, PutVariant, PutBinary, Reading and Writing Data