setvar - set a named variable

SYNOPSIS

<setvar [flags] $var $values>


DESCRIPTION
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


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


EXAMPLE

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


CAVEATS
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.


SEE ALSO
getvar, readvars


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