.pointer Property

Function:

Sets/returns the current pointer position in the resource (ROM) file.

Type:

Word

Value Range:

See the explanation below.

See Also:

romfile. Object


Details

When the file is (re)opened with the romfile.open method, the pointer is reset to the first character of the file (position 1). If the file is not found or contains no data, the pointer is set to 0.

The pointer position cannot exceed romfile.size + 1. When you read from the file with romfile.getdata, the pointer is automatically moved forward by the number of bytes that have been read out.

Since this property is of the word type, the maximum pointer value you can set with it is 65535. Reading the current pointer position with this property will return 65535 for all pointer positions from 65535 and up. To navigate within the files that exceed 65,535 bytes, use romfile.pointer32 instead.


.pointer Property

Details