209 Examples 100 DIM partnumbers(1000) 3000 DIM employeename$(35) 240 DIM ALL_hours_in_the_week(24,7) 100 DIM A(X) Description A statement which dimensions arrays. Arrays must be predeclared before use. After dimensioning all elements of arrays are initialised to zero for numeric arrays or null strings in the case of string arrays. The lowest element in an array is element zero. Thus DIMX(4) would create an array of five elements (0 to 4 inclusive). There is a second and quite different use for the DIM statement. It can be used to reserve bytes in memory for special applications. To reserve 25 bytes, type DIM X 24 Notice two things about this statement:
firstly the space between the variable X and the (number of bytes minus 1) and secondly the absence of parentheses around the 24 . The address of the start of the group of 25 bytes is given in the variable X in this example. Syntax DIM | ( {, } ) or DIM Associated keywords None