setvar - set a named variable


<setvar [flags] $var $values>

The setvar function sets the (single) variable named by $var to $values. It can be used in the rare situations where the name of a variable cannot be determined until run time.

Optional flags:

  • APPEND - values are appended to the end of the variable's current value list (and are cast to that type)

  • NOMSG - no putmsg will be issued if the value cannot be set

The setvar function sets the single variable named by $var to $values, and returns nothing.


<SQL MAX=1 "select Name, Value from test where id=$id">
    <setvar $Name $Value>

The setvar function was added May 7 1997.

If a variable named in a setvar call is not directly used in the script (i.e. is not explicitly referenced with $ elsewhere), it will not have any values since it is unknown.

getvar, readvars

Copyright © Thunderstone Software     Last updated: Apr 15 2024
Copyright © 2024 Thunderstone Software LLC. All rights reserved.