Char

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

Purpose

Declares one or more Char (one byte signed integer) variables.

Syntax

To declare Char variables

Char {identifier} [… {identifier}]

Where

To declare array variables of type Char

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

Where

What It Does

The Char command declares integer variables of one byte in the range -128 to +127.

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

Example

Procedure Test

    Char cMyVar

 

    Move 1 To cMyVar

End_Procedure

This example declares a Char variable named cMyVar and initializes its value to 1.

 

Char[] cLengthOfJumpInFeet

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

Char[5] cLengthOfJumpInFeet

This example declares 1 static array variable, named cLengthOfJumpInFeet, containing 5 of elements of type Char.

Char[][3] cLengthOfJumpInFeet

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