Name
WriteShort -- write 16-bit integer to a file (V2.0)
Synopsis
WriteShort(id, short[, flags])
Function
This function writes a 16-bit integer to the file specified by id at the current file cursor position which you can modify by using the Seek() command. Since a short integer is 16-bit, the file cursor will be advanced by 2 bytes.

The flags parameter may be a combination of the following flags:

#IO_UNSIGNED:
Use an unsigned integer. This means that short must be in the range of 0 to 65535. This is the default.

#IO_SIGNED:
Use a signed integer. This means that short must be in the range of -32768 to 32767.

#IO_LITTLEENDIAN:
By default, this function stores the value in big endian format (most significant byte first). You can set this flag to request this function to use the little endian format instead.

Inputs
id
file to write to
short
short integer value to write to the file
flags
optional: additional flags (see above) (defaults to #IO_UNSIGNED) (V9.0)

Show TOC