112
Chapter 7
If you want to override precedence, or if you are in any doubt of the order of evaluation, you can
use parentheses to make it explicit—for example,
sqrt(abs(Signal))* (max(T1, T2) + Baseline)
Stream, Session, and SuperNode Param eters
Parameters can be dened for use in CLEM expressions and in scripting. They are, in effect,
user-dened variables that are saved and persisted with the current stream, session, or SuperNode
and can be accessed from the user interface as well as through scripting. If yo u save a stream, for
example, any parameters set for that stream are also saved. (This distinguishes them from local
script variables, which can be used only in the script in which they are declared.) Parameters are
often used in scripting as part of a CLEM expression in which the parameter value is specied in
the script.
The scope of a parameter depends on where it is set:
Stream parameters can be set in a stream script or in the stream properties dialog box, and
they are available to all nodes in the stream. They are d isplayed on the Parameters list in the
Expression Builder.
Session parameters can be set in a stand-alone script or in the session parameters di alog
box. They are available to all streams used in th ec urrent session (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 CLEM expressions by $P-pname, where pname is the name of
the parameter. When used in CLEM expressions, parameters must be p laced within single
quotes––for example, '$P-scale'.
Availableparameters are ea sily viewed using the Expression Builder. To view current parameters:
EIn any dialog box accepting CLEM expressions, click the Expression Builder button.
EFrom the Fields list, select Parameters.
Youcan select paramet ers from the list for insertion into the CLEM expression. For more
information, see the topic Selecting Fields, Parameters, and Global Variables on p. 121.
Working with Strings
There are a number of operations available for strings, including:
Converting a string to upper case or lower case—uppertolower(CHAR).
Removing specied characters, such as `ID_` or `$`, from a string
variable—stripchar(CHAR,STRING).