Language and Conventions Overview


Data Types

There are three data types in the GRIP language:

The variable names for these data types, regardless of type, cannot exceed 32 characters. The first character of the variable name must be alphabetic. The first six characters must be unique. Only these first six characters are listed at the end of the compiler listing. Underscores are valid characters for variables. In addition, Fortran-like arrays of up to three dimensions may be defined for Numerical and Object data types. Strings can be up to two dimensional. Most major words may be used as variables, but if defined as a variable, it cannot be used as a major word in that same routine. Major words that are invalid in batch processing are also invalid as variables.

The following shows examples of variables and whether they compile:

Example Variable Name

Will it Compile?

Obj_Counter

Yes, but appears as OBJ_CO at the end of the compiler listing.

Entity_Counter

No. ENTITY is a reserved word that appears in the program.

This_is_a_long_name_that_won't_compile

No. More than 32 characters.

1

Yes.