Click or drag to resize

IsObject Function

X#
Determine if a value is an object.

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

Parameters

uValue
Type: Usual
The value to examine.

Return Value

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