SetVariable()

Sets a variable value, supports scoped variable syntax

SetVariable( name=string, value=any );

Returns: any

Argument Description
name
string, required

Name of the variable to set, allows using "." for structures/scopes.

value
any, required

the value to set

Examples

str="hi buddy";
	setVariable('str', "Value changed");
	writeOutput(str);
<span class="nf">setVariable</span><span class="p">(</span><span class="s1">&#39;session.AAA&#39;</span><span class="p">,</span> <span class="s2">&quot;Hello docs reader&quot;</span><span class="p">);</span>
<span class="nf">dump</span><span class="p">(</span><span class="nf">getVariable</span><span class="p">(</span><span class="s2">&quot;session&quot;</span><span class="p">));</span>

See also