VarPut Function |
Namespace: XSharp.RT
[NeedsAccessToLocalsAttribute(TRUE)] FUNCTION VarPut( cVarName AS STRING, uValue AS USUAL ) AS USUAL
[NeedsAccessToLocalsAttribute(true)] public static Usual VarPut( string cVarName, Usual uValue )
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. |
1LOCAL cFieldName 2cFieldName := "Address" 3VarPut(cFieldName, "Hollywood, Room 222")
1LOCAL cHasName 2cHasName := "cPrivate" 3// Instead of &cHasName := "new", use this: 4VarPut(cHasName, "new") 5? cPrivate // new
1VarPut("cVar", "hi") 2? _MEMVAR->cVar // hi