$cvar

<< Click to Display Table of Contents >>

Navigation:  User guide > Variables >

$cvar

The term cvar represents a character variable name of up to 30 characters which is always preceded by a dollar sign. Cvars can hold up to 2000 characters of text. The length of a cvar is defined in its first definition - the number of data locations in the field or the number of characters in the literal, from which it is defined. Parts of cvars can be tested and set using substrings.

A cvar is normally given a value with a D (define) command. The following examples define cvars:

dc $post=$109-120,

dc $whynot=$241-280,

dc $sex = ’r;M’,

The variable $POST contains up to 12 characters, $WHYNOT contains up to 40 characters and $SEX contains 1 character. The D (define) statements are executed and the values copied from the data locations to the variables when the definition commands are reached. In the above examples the fields are treated as containing text.