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.4a
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#
 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