◄Contents► ◄Index► ────────────────────────────────────────────────────────────────────────────── DIM declares an array or specifies a data type for a nonarray variable. REDIM declares or resizes a dynamic array, erasing any previous values. DIM [SHARED] variable[(subscripts)] [AS type] [,variable[(subscripts)] [AS type]]... REDIM [SHARED] variable(subscripts) [AS type] [,variable(subscripts) [AS type]]... ■ SHARED Specifies that variables are shared with all SUB or FUNCTION procedures in the module. ■ variable The name of an array or variable. ■ subscripts Dimensions of the array, expressed as follows: [lower TO] upper [,[lower TO] upper]... lower The lower bound of the array's subscripts. The default lower bound is zero. upper The upper bound. ■ AS type Declares the data type of the array or variable (INTEGER, LONG, SINGLE, DOUBLE, STRING, or a user-defined data type). ■ DIM declares either static or dynamic arrays. Unless array storage has been determined by $STATIC, $DYNAMIC, or COMMON, arrays dimensioned with numbers are static and arrays dimensioned with variables are dynamic. REDIM always declares dynamic arrays. ■ Static array storage is allocated when you start a program and remains fixed. Dynamic array storage is allocated while a program runs. Example: ' $DYNAMIC DIM A(49, 49) REDIM A(19, 14) See Also ◄COMMON► ◄ERASE► ◄OPTION BASE► ◄SHARED, STATIC► ◄$STATIC, $DYNAMIC► ◄Differences from BASICA► ────────────────────────────────────────────────────────────────────────────── © Copyright Microsoft Corporation, 1987-1992. All rights reserved. Converted from qbasic.hlp with DosHelp/HelpConvert