You're browsing the old v2.x documentation. This version is no longer maintained. Click here to go the v3.x documentation.



dim <any variable>[<const byte or int x_dim> [, <const byte or int y_dim>]] [fast | @<const int address>]

The DIM directive defines a variable or an array in compile time. See the Arrays page for more information about arrays.

Variables do not need to be predefined, but the DIM directive allows you to do so. For example you can use DIM to define fast variables:

dim myFastVar fast

Read more about fast variables on the Variables page.

Since version 2.2, you can explicitly tell the compiler where in the memory the variable or array will reside, for example you can map the screen to an array as follows:

dim screen![1000] @ $0400