###Function###
Assign

###Description###
Assigns a variable by name with the data.

###Syntax###
Assign ( "varname", "data" [, flag = 0] )


###Parameters###
@@ParamTable@@
varname
	The name of the variable you wish to assign. Cannot be an array element and must only contain letters, digits and underscore characters (as per normal variable naming conventions).
data
	The data you wish to assign to the variable.
flag
	[optional] controls the way that variables are assigned (add required options together):
		0 = (default) Create variable if required
		1 = Force creation in local scope
		2 = Force creation in global scope
		4 = Fail if variable does not already exist
@@End@@

###ReturnValue###
@@ReturnTable@@
Success:	1.
Failure:	0 if unable to create/assign the variable.
@@End@@


###Remarks###
If there is a need to use <a href="Assign.htm">Assign()</a> to create/write to a variable, then in most situations, <a href="Eval.htm">Eval()</a> should be used to read the variable and <a href="IsDeclared.htm">IsDeclared()</a> should be used to check that the variable exists.


###Related###
Eval, Execute, IsDeclared


###Example###
@@IncludeExample@@
