Short

See Also: Declaring Variables, Variable Declaration Commands, Struct, UShort

Purpose

Declares one or more Short (two byte signed integer) variables.

Syntax

To declare Short variables

Short {identifier} [… {identifier}]

Where

To declare array variables of type Short

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

Where

What It Does

Short declares integer variables of 2 bytes in the range -32,768 to 32,767.

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

Examples

Procedure DoTest

    Short siMyVar

 

    Move 1 To siMyVar

End_Procedure

This example declares a Short variable named siMyVar and initializes it.

 

Short[] siSeats

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

Short[5] siSeats

This example declares 1 static array variable, named siSeats, containing 5 of elements of type Short.

Short[][3] siSeats

This example creates a two-dimensional dynamic array variable named siSeats, containing an undefined number of elements of type Short. 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