int FileReadQuad(int file)
Pass a handle to a file opened in read mode, and returns the integer value of the first four bytes at the current position, and moves the position onto the following byte. The can be the full value of a verge integer, including negative numbers. The least significant byte is read in first, so effectively performing:
FileReadByte(file) + (FileReadByte(file) << 8) + (FileReadByte(file) << 16) + (FileReadByte(file) << 24)
int file = FileOpen("readme.txt", FILE_READ); Log(str(FileReadWord(file))); FileClose(file); // This read the first two bytes and logs the value // First line is "Welcome to VERGE 3! " so logs // The number '1668048215' which is a compound // Of the values of 'W', 'e', 'l', and 'c' in ascii // Obviously this is more useful as a big number
There are no talkbacks on this documentation page yet. Post the first?
Doc Nav |
Your docs |