Clalev
clalev
allows you to know if a class (usually a table associated class) can be accessed in a given context.
clalev(CLASS_DESCRIPTION)clalev(NUMERIC_EXPRESSION)
CLASS_DESCRIPTION
is a class description with the [ABBR]
syntax, where ABBR
is the abbreviation of a class.NUMERIC_EXPRESSION
refers to the slot number for the class. This can be seen in the debugger, but should be considered rather as internal. # 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
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).
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.
Error | Description |
---|---|
50 | The numeric argument is negative. |
clanam, clasiz, clanbs, clavar.