Click or drag to resize

IsClass Function

Determine if a class exists.

Namespace:  XSharp.RT
Assembly:  XSharp.RT (in XSharp.RT.dll) Version: 2.10
Syntax
 FUNCTION IsClass(
	symClassName AS STRING
) AS LOGIC
View Source

Parameters

symClassName
Type: String
The symbol of the class to examine.

Return Value

Type: Boolean
TRUE if the class exists; otherwise, FALSE.
Remarks
Examples
This example shows that IsClass() returns TRUE for a declared class name:
X#
CLASS Cars                        // Declare a class named Cars
? IsClass(#Cars)                // TRUE
This example uses IsClass() to decide how to manipulate colors:
X#
LOCAL uColor AS USUAL
IF IsClass(#CustomPalette)
        uColor := CustomPalette{}
ELSE
        uColor := SetColor()
ENDIF
See Also