WriteInt -- write an integer to a file (V2.0)
WriteInt(id, int[, flags])
This function writes an integer to the file specified by id at the current file cursor position which you can modify by using the Seek() command. By default, WriteInt() will write a 32-bit integer, advancing the file cursor by 4 bytes.

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

Use signed integers. This means that int must be in the range of -2147483648 to 2147483647 (in case #IO_FAKE64 isn't set). This is the default.

Use unsigned integers. This means that int must be in the range of 0 to 4294967295. Note that #IO_UNSIGNED cannot be combined with #IO_FAKE64.

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.

Use 64-bit integers. This is called "fake 64" because Hollywood can't use the full 64-bit integer range because its numeric type is a 64-bit floating point value which can't represent exactly the same range as a true 64-bit integer value. Still, Hollywood's fake 64-bit integers should be large enough for almost anything. Using #IO_FAKE64 you can write integers in the range of -9007199254740992 to 9007199254740992. Note that #IO_UNSIGNED can't be used with #IO_FAKE64. Hollywood's fake 64-bit integers will always be signed. (V9.0)

file to write to
integer value to write to the file
optional: additional flags (see above) (defaults to #IO_SIGNED) (V9.0)

Show TOC