VarGet Function | |
Return the contents of a field or a memory variable.
Namespace:
XSharp.RT
Assembly:
XSharp.RT (in XSharp.RT.dll) Version: 2.19
Syntax FUNCTION VarGet(
cVarName AS STRING
) AS USUAL
public static Usual VarGet(
string cVarName
)
Request Example
View SourceParameters
- cVarName
- Type: String
The name of the field or memory variable.
Return Value
Type:
UsualRemarks
VarGet() is used instead of a macro when the name of the field or memory variable is in a string.
Remarks Tip |
---|
Dynamic memory variables (PUBLIC, PRIVATE, PARAMETERS) are supported in the X# language and runtime for compatibility only.
In most cases the type can and should be replaced with lexically scoped variables, such as LOCALs and GLOBALs.
|
Examples
This example uses VarGet() to retrieve the contents of a field:
1LOCAL cFieldName := "Address"
2USE Customer
3
4? VarGet(cFieldName)
See Also