Name
ReadFloat -- read a float from a file (V2.0)
Synopsis
float = ReadFloat(id[, width, le])
Function
This function reads a signed float 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 float value takes up 8 bytes which is enough to store really big integers and floats with many decimal places.

Starting with Hollywood 6.0 there is an optional argument which allows you to specify the byte width of the floating point number. This can be 8 for a double-precision floating point number or 4 for a single-precision floating point number. By default, ReadFloat() reads double-precision floats.

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
width
optional: byte width of the float (defaults to 8) (V6.0)
le
optional: True to read bytes in little endian order, False for big endian order (defaults to False) (V6.0)
Results
float
float value

Show TOC