$wvar

<< Click to Display Table of Contents >>

Navigation:  User guide > Variables >

$wvar

The term wvar represents a double-precision variable name of up to 30 characters which is always preceded by a dollar sign. A wvar can hold a number of any size including fractional parts. There is no practical limit to how big or small the value of a double precision variable can be, but precision is to 13 significant digits. Wvars can also be set to U (undefined).

Undefined is a special value (actually a very large negative number) which CL places in an wvar when a faulty definition is used. Any arithmetic involving an undefined number has an undefined result unless UZA is used.

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

f=adf,

dw $value=$112-117,

dw $weight=$141-155,

dw $ratio=13.5,

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 first two examples, the fields are treated as containing a numeric value possibly with a decimal point. Use format ANF to accept negative values in fields.

An wvar is normally preset to 0 (zero). Use RCP UNDEFINED to preset to U (undefined).