Click or drag to resize

MemVarPut Function

Assign a value to a memory variable of a given name.

Namespace:  XSharp.RT
Assembly:  XSharp.RT (in XSharp.RT.dll) Version: 2.0
Syntax
 FUNCTION MemVarPut(
	cVar AS STRING,
	uValue AS USUAL
) AS USUAL

Parameters

cVar
Type: String
The name of the variable you want to create.
uValue
Type: USUAL
The value to assign to the variable.

Return Value

Type: USUAL
The value assigned to the memvar.
Remarks
If a memory variable with that name does not exits, a new memory variable is created. Therefore, MemVarPut(), like VarPut() can be used to create undeclared memory variables. It should be used instead of a macro.
Remarks
Tip 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.
See Also