Purpose: Writes data to a binary file.

Formats:   1)     FWRITE    ID    variable    type    <byte ordering>
                    2)     FWRITE    ID    $variable    size
                    3)     FWRITE    ID    memory(x)    size    type    <byte ordering>

Notes:      These statements will write data to a file in the form designated by the  type  parameter.  The  byte ordering  parameter is  B  for big endian,  L  for little endian (default)  and is optional.

Form 1:  The single value in  variable  is written to the file.

Form 2:  Use this to write  size  characters of the  $variable  text string to the file.

Form 3:  Writes  size  values to the file from the memory array starting at the location specified by  x.

Binary File Numeric Types
Type Description Bits Range
f64 Double Floating Point  64 3.4E-308 to 3.4E+308  (15 digit precision)
f32 Floating Point 32 1.7E-38 to 1.7E+38  (7 digit precision)
u32 Unsigned Long Integer  32 0 to 4,294,967,295
s32 Signed Long Integer 32 -2,147,483,648 to +2,147,483,647
u16 Unsigned Short Integer 16 0 to 65,535
s16 Signed Short Integer 16 -32,768 to +32,767
u8 Unsigned Byte  8 0 to 255
s8 Signed Byte   8 -128 to +127

See Also:  Binary File Operations