webCOMAND

#NEW

Assigns the contents of the statement block to a variable.  The block can contain cTemplate code to produce the value.  This statement does not produce output.

Prototype

#NEW($variable) ... #ENDNEW

Parameters

  • variable - Variable name to set to the content between the #NEW() and #ENDNEW.  It can be a new/uninitialized variable, or an existing variable to be modified.

Example

To assign a string we must enclose the string in quotes.

#NEW($B)Text#ENDNEW
$B is the magic string.

Result

Text is the magic string.

Analysis

In this example, a new variable called $B is created and is set to the value Text.

Related

#APPEND, #ASSIGN