Nyquist / XLISP 2.0 -
Contents |
Tutorials |
Examples |
Reference
write-int
Type: |
- |
function (subr) |
Source: |
- |
xlfio.c |
Syntax
- (write-int integer [stream [length]])
- integer - the integer to write
stream - the output stream [default is standard output]
length - the length of the integer in bytes [default is 4]
returns - the integer
Description
The 'write-int' function writes an integer to a binary output
stream, created by the
open-binary function.
Note: Integers and floats are assumed to be
big-endian [high-order byte first] and signed,
regardless of the platform. To read little-endian
format, use a negative number for the length, e.g. '-4' indicates a
4-bytes, low-order byte first. The file should be
opened in binary mode.
Examples
See also read-int,
read-float,
write-float,
bigendianp,
open-binary.
Back to Top
Nyquist / XLISP 2.0 -
Contents |
Tutorials |
Examples |
Reference