Warning

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

This is an old revision of the document!


DIM

Syntax:

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

The DIM directive defines a variable or an array. 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