Declare array variables, or variables which are not floating-point type

Syntax


dimension <data type> <variable name>[dimension1, dimension 2, …], <additional variables>

Description


By default, any variable which is not declared using the DIMENSION statement is considered to be a scalar floating-point variable.  The DIMENSION statement is used to explicitly declare a variable or constant as another data type (integer, string, logical or user-defined type), or to declare the variable/constant as an array or matrix.

Example


dimension integer x[2, 3], y[20]

dimension integer i, j, k

dimension PIDController controller