Integer

See Also: Declaring Variables, Variable Declaration Commands, Struct, Real, Integer Function

Purpose

Declares one or more Integer variables.

Syntax

To declare Integer variables

Integer {identifier} […{identifier}] 

Where

To declare array variables of type Integer

Integer{dimension-list} {identifier} […{identifier}] 

Where

What It Does

Integer declares integer variables. Integers are whole numbers (no decimals) in the range -2,147,483,648 to 2,147,483,647.

Multiple variables may be declared on one command line, with their names separated from each other by spaces.

Examples

Procedure Test

    Integer iCounter

End_Procedure  // Test

This example declares 1 integer variable named iCounter.

Integer i iCounter iCustomers

This example declares 3 integer variables named i, iCounter and iCustomers.

 

Integer[] iStudentIds

This example declares 1 dynamic array variable, named iStudentIds, containing an undefined number of elements of type integer.

Integer[5] iStudentIds

This example declares 1 static array variable, named iStudentIds, containing 5 of elements of type integer.

Integer[][3] iColors

This example creates a two-dimensional dynamic array variable named iColors, containing an undefined number of elements of type integer. Conceptually, this represents a rectangular array with an undefined number of rows, each of 3 columns.

You can declare dynamic multi-dimensional arrays where all dimensions are dynamic; these are called jagged arrays.

Notes

 

Integer iCounter

Move 0 to iCounter