RAZ

Contents


Raz is used to reset a variable or class of variables to zero.

 

Syntax

   Raz list_cla_var

 

Parameters

Element

Description

Restrictions

list_cla_var

List of classes orvariables separated by the character ','.

The class must exist

variable

Variable expressed in one of the following forms:
nom_de_variable
nom_de_variable '(' list_ind')'

The variable must exist.

list_ind

List of integer expressions expressing the indices of the element to be reset to zero. The elements in the list are separated by ','. By default, all the elements of the variable shall be reset to zero.

The number of elements must match the number of dimensions of the variable.

 

Examples

# Reset to zero an element of a variable with dimension 3 and of
# all the local variables
    Raz CHAINE(3, 2, 5), [L]

# Reset to zero the numerical variable SOLDES (with all its
# elements if dimensioned)
    Raz SOLDES

# Reset to zero a date in a mask
    Raz [M:SDA]DATEJ

# Reset a class to zero
    Raz [M:ABC]       :# variables of the mask are reset to 0

 

Description and comments

Raz is used to reset a full variable to zero (if no index is given), an element in the variable (if there is an index) or a whole class.

The reset to zero gives the variables values dependent on type, that is:

·         an empty string "" for a Char type variable,

·         a null date [0/0/0] for a Date type variable,

·         value 0 for a numerical variable.

For an Raz on a mask variable, the 'field not set' information is set (not the case if a null value is assigned to this variable). When this variable is entered the default value will be calculated as if the variable had never been entered or initialised.

 

Associated errors

Error

Description

ERCLAS (7)

Non-existent class.

ERVARI (6)

Non-existent variable.

 

Associated key words

VARINIT - KILL - EFFZO


CONTENTS


Copyright © Sage 1999 - 2007