Name
ReadInt -- read an integer from a file (V2.0)
Synopsis
int = ReadInt(id[, le])
Function
This function reads a signed integer 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. An integer takes up 4 bytes.

The returned value will be signed and will range from -2147483648 to 2147483647. If you need to store larger values, you should use the WriteFloat() command which uses 64-bit values which are enough for almost everything.

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
int
integer value

Show TOC