Inno Setup Preprocessor: #dim, #redim

Inno Setup Preprocessor

Inno Setup Preprocessor: #dim, #redim

Syntax

dim-directive: dim [private | protected | public] <ident> [ <expr> ]
redim-directive: redim [private | protected | public] <ident> [ <expr> ]

Description

Use dim to declare an array variable and set its dimension. All elements of the array are initialized to null (void). To assign an element value after declaring the array, use define. Instead of assigning element values with define, it is also possible to set an element value by using it as the left operand of an assignment.

Use redim to increase or decrease the dimension of an existing array variable. All new elements of the array are initialized to null (void) and existing elements are left unchanged. Identical to dim if ident isn't an existing array variable.

Examples

#dim MyArray[10]
#define MyArray[0] 15
#redim MyArray[20]
#define MyArray[10] 30
#redim MyArray[10]

See also

define, undef, DimOf, Visibility of Identifiers.