User's Manual
112
Chapter 7
If you want to ov erride precedence, or if you are in any doubt of the or der of evaluation, you ca n
use parenthes
es to make it explicit —for example,
sqrt(abs(Signal)) * (max(T1, T2) + Baseline)
Stream, Session, and SuperNode Parameters
Parameters can be defined for use in CLEM expressions and in scripting . They are, in effect,
user-defined variables that are saved and persisted with the current stream, session, or Super Node
and can be accesse d from the user inter f ace as well as through scripting. If you save a stream, for
example, any param eters set for that stream ar e also saved. (This distinguishes them from local
script vari ables, which can be used only in the script in which they are declared.) Parameters are
often used in scripting as part of a CLEM expre ssion in which the parameter value is specified in
the script.
The scope of a parameter depends on where it is set:
Stream paramete r s can be set in a s tream script or in the stream properties dial og box, and
they are ava ilable to all nodes in the stream. They are displayed on the Parameters list in the
Express ion Build er.
Sessio n parameters can be set in a stand-alone script or in the session parameters dialog
box. They are available to all streams used in the current se ssion (all streams listed on the
Streams tab in the managers pane).
Parameters can also be set for SuperNodes, in which case they are visible only to nodes
encapsulated within that SuperNode.
Using Parameters in CLEM Expressions
Parameters are represented in CLE M expressions by $P-pname, where pname is the name of
the parameter. When used in CLEM ex pressions, parameters must be placed within sing le
quotes––for example , '$P-scale'.
Available parameters are easily viewe d using th e Ex pression Builder. To view current para meters:
E In any dialog box accepting CLEM expressions, c lick the Expressio n Builder but ton.
E From the Fields list, select Parameters.
You can select parameter s from the list for insertion into the CLEM e xpression . For more
informa tion, see the topic Selecting Fields, Parameters, and Global Variables o n p. 121.
Working with Strings
There ar e a number of operations available for strings, including:
Converting a string to upper case or lower case—uppertolower(CHAR).
Removing specified characters, such as `ID_` or `$`, from a string
variable—stripchar(CHAR,STRING).