Clalev

clalev allows you to know if a class (usually a table associated class) can be accessed in a given context.

Syntax

 clalev(CLASS_DESCRIPTION)clalev(NUMERIC_EXPRESSION)

Examples

 # List of the classes available in the current contextLocal Integer MAXCLA,I,JMAXCLA = 200Local Char CLASS_NAMES(20)(1..MAXCLA)For I = 1 To MAXCLAIf clalev(I) <> 0J+=1CLASS_NAMES(J)=clanam(I)EndifNext I# If the [ORDER] table openedIf clalev([ORDER])# The table is already openedElse# The table is not openedEndif

Description

clalev allows you to determine if a class with a given abbreviation is available.

The result of the function is an integer value of 1 (if the class is available) or 0 (if the class is not available).

Comments

This function was used in version 6 programming to avoid re-opening an already opened table. In version 7, it is deprecated because opening a table has been optimized and also because not opening a table can cause conflicts.

You can still use it when a common subprogram is supposed to use an already opened class, and open it if it is not the case.

Associated errors

ErrorDescription
50The numeric argument is negative.

See also

clanam, clasiz, clanbs, clavar.