Click or drag to resize

IsObject Function

Determine if a value is an object.

Namespace:  XSharp.RT
Assembly:  XSharp.RT (in XSharp.RT.dll) Version: 2.10
Syntax
 FUNCTION IsObject(
	uValue AS USUAL
) AS LOGIC
View Source

Parameters

uValue
Type: Usual
The value to examine.

Return Value

Type: Boolean
TRUE if the value is an object; otherwise, FALSE.
Remarks
Examples
This example uses IsObject() to check whether a correct argument was passed:
X#
FUNCTION OOpsCheck(uObject) AS LOGIC
        LOCAL lSuccess AS LOGIC
        LOCAL aObject AS ARRAY
        lSuccess := IsObject(uObject)
        IF lSuccess
                // Display object contents
                aObject := Object2Array(uObject)
                FOR i := UPTO ALen(aObject)
                        QOut(aObject[i])
                NEXT
        ELSE
                ? "Object is required"
        ENDIF
        RETURN lSuccess
See Also