Click or drag to resize

IVarPutInfo Function

Get information about how a particular instance variable (or assign method) was declared.

Namespace:  XSharp.RT
Assembly:  XSharp.RT (in XSharp.RT.dll) Version: 2.08
Syntax
 FUNCTION IVarPutInfo(
	oObject AS Object,
	symInstanceVar AS SYMBOL
) AS DWORD
View Source

Parameters

oObject
Type: Object
The object containing the instance variable.
symInstanceVar
Type: Symbol
The instance variable that you want information about.

Return Value

Type: UInt32
A numeric value that can be interpreted as follows: wIvarInfo Description 0 Not found 1 INSTANCE declaration 2 EXPORT declaration 3 ASSIGN declaration Note:  PROTECT and HIDDEN variables cannot be tested with this function.
Remarks
IVarPutInfo() tests for an instance variable or assign method of a given name and returns a numeric value indicating how (or if) the variable was declared.
Examples
This example illustrates the various return values for IVarPutInfo():
X#
CLASS A
        INSTANCE x
        EXPORT y
ASSIGN z(value) CLASS A
        z := value
        RETURN value
X#
FUNCTION Start()
        LOCAL o AS A
        o := a{}
  ? IVarPutInfo(o,#x)                        // 1
  ? IVarPutInfo(o,#y)                        // 2
  ? IVarPutInfo(o,#z)                        // 3
  ? IVarPutInfo(o,#none)                        // 0
See Also