Click or drag to resize

IVarGetInfo Function

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

Namespace:  XSharp.RT
Assembly:  XSharp.RT (in XSharp.RT.dll) Version: 2.4a
Syntax
 FUNCTION IVarGetInfo(
	oObject AS Object,
	symInstanceVar AS STRING
) AS DWORD
View Source

Parameters

oObject
Type: Object
The object containing the instance variable.
symInstanceVar
Type: String
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 ACCESS declaration Note:  PROTECT and HIDDEN variables cannot be tested with this function.
Remarks
IVarGetInfo() tests for an instance variable or access 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 IVarGetInfo():
X#
 1CLASS A
 2    INSTANCE x
 3    EXPORT y
 4ACCESS z CLASS A
 5FUNCTION Start()
 6    LOCAL o AS A
 7    o := a{}
 8? IVarGetInfo(o,#x)            // 1
 9? IVarGetInfo(o,#y)            // 2
10? IVarGetInfo(o,#z)            // 3
11? IVarGetInfo(o,#none)            // 0
See Also