Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
dim [2019/05/07 08:50]
neils
dim [2019/07/29 09:19] (current)
neils
Line 3: Line 3:
 Syntax: Syntax:
  
-  dim <any variable>​[<​byte or int x_dim> [, <byte or int y_dim>]]+  dim <any variable>​[<​byte or int x_dim> [, <byte or int y_dim>]] [fast]
  
-The ''​DIM''​ directive defines an array. See the [[arrays|Arrays]] page for more information.+The ''​DIM''​ directive defines ​a variable or an array. See the [[arrays|Arrays]] page for more information ​about arrays.
  
-''​DIM'' ​can also be used to define a single variable without having to assign a value. For example:+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 x +  dim myFastVar fast 
-  ​rem -- x is now an uninitialized variable +   
-  print x +Read more about fast variables on the [[Variables|Variables]] page.
-  rem -- the above will print an undefined number+