# Directives

DIM CLASS | Set an Elements Type-Flag

## Format

DIM CLASS array$ [ strName$ ] = strval$

Where:

array$ | String array whose element you want to change
strName$ | String expression or literal containing the index of the element to change
strval$ | String expression that must contain the value "N" (for Numeric) or "S" (for String) #### Note: The system only checks the first character, and either uppercase or lowercase values are accepted. Any value other than "N" or "S" will result in an Error #26: Variable type invalid.

## Description

While the type-flags for each element will be set automatically when the array is loaded from either JSON or IOLIST, you can change the type-flag using the DIM CLASS directive. If the element does not exist, it will be created dynamically.

(The DIM CLASS directive was added in PxPlus 2016.)

## See Also

DIM Define Arrays and Strings