Click or drag to resize

IsClass Function

X#
Determine if a class exists.

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

Parameters

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

Return Value

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