Name
ReadShort -- read a short from a file (V2.0)
Synopsis
short = ReadShort(id[, le])
Function
This function reads an unsigned short value from the file specified by id and returns it. Reading starts from the current file cursor position which you can modify using the Seek() command. A short takes up 2 bytes.

The returned value will be unsigned and will range from 0 to 65535. If you need to store signed values, use WriteInt() instead.

By default, this function expects the data to be stored in big endian format (most significant byte first). Starting with Hollywood 6.0 you can use the optional argument le to explicitly request this function to use the little endian format instead.

Inputs
id
file to read data from
le
optional: True to read bytes in little endian order, False for big endian order (defaults to False) (V6.0)
Results
short
short value in the range of 0 to 65535

Show TOC