user manual
152
Chapter 8
For this reason, @SINCE does not evaluate its condition for the current record. Use a sim ilar
function, @SI
NCE0, if you want to evaluate the condition for the curr ent record as well as previous
ones; if the c ondition is true in the current re cord, @SINCE0 returns 0.
Note: @ functions cannot be called from scripts .
Function
Result
Description
MEAN(FIELD)
Real
Returns the mean average of values for the specified
FIELD or FIELDS.
@MEAN(FIELD, EXPR)
Real
Returns the mean average of values for FIELD o ver
the last EXPR recor ds received by the current node,
including the current record. FIELD must be the name
of a numeric field. EXPR m ay be any expressi on
evaluating to an integer greater than 0. If EXPR is
omitted or if it exceeds the num ber of records received
so far, the average over all of the records receiv ed
so far is return ed. Note that this function cannot be
called from a script.
@MEAN(FIELD, EXPR, INT)
Real
Returns the mean average of values for FIELD o ver
the last EXPR recor ds received by the current node,
including the current record. FIELD must be the name
of a numeric field. EXPR m ay be any expressi on
evaluating to an integer greater than 0. If EXPR is
omitted or if it exceeds the num ber of records received
so far, the average over all of the records received so
far is r et urned. INT specifies the maximum number
of values to look back. This is far more efficient than
using just two arguments.
@DIFF1(FIELD)
Real
Returns the first differential of FIELD1. The
single-argument form thus simply returns the
difference between the cu rrent v al ue and the previous
value of t he field. Returns 0 if the relevant previou s
records do not exist.
@DIFF1(FIELD1, FIELD2)
Real
The two-argument form g i ves the first differential of
FIELD1 with respect to FIELD2. Returns 0 if the
relevant previous records do not exist.
@DIFF2(FIELD)
Real
Returns the second differential of FIELD1. The
single-argument form thus simply returns the
difference between the cu rrent v al ue and the previous
value of t he field. Returns 0 if the relevant previou s
records do not exist
@DIFF2(FIELD1, FIELD2)
Real
The two-argument form g i ves the first differential of
FIELD1 with respect to FIELD2. Returns 0 if the
relevant previous records do not exist.
@INDEX
Integer
Returns the index of the current record. Indices are
alloc
ated to records as they arrive at the current node.
The first record is given index 1, and the index is
incremented by 1 for each subsequent record.
@LAST_NON_BLANK(FIELD)
Any
Returns the last value for FIELD that was not blank,
as defined in an upstream source or Type node.
If there are no nonblank values for FIELD in the
records read so far, $null$ is returned. Note that blank
values, also called user-missing values, can be defined
separately for each field.
@MAX(FIELD)
Number
Returns the maximum value for the specified FIELD.