You must be logged in to do that.

FileReadQuad

FileReadQuad
int FileReadQuad(int file)

Documentation

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)

Example Usage

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
Talkback

There are no talkbacks on this documentation page yet. Post the first?

Post a new comment?

Ben McGraw's lovingly crafted this website from scratch for years.
It's a lot prettier this go around because of Jon Wofford.
Verge-rpg.com is a member of the lunarnet irc network, and would like to take this opportunity to remind you that regardless how babies taste, it is wrong to eat them.