Arrays

From Final Fantasy XII Wiki
Revision as of 13:50, 15 July 2019 by Admin (talk | contribs) (Created page with "Virtual Machine supports either one or two dimensional arrays. Each variable type can be declared as an array. Accessing indexes is done by pushing values to the stack. So for...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Virtual Machine supports either one or two dimensional arrays. Each variable type can be declared as an array. Accessing indexes is done by pushing values to the stack. So for an array:

int array[2][3]; accessing element array[0][1] is done by performing operations:

PUSHII 0

PUSHII 1

PUSHV [array]

where [array] is number of variable array in variable table.