When you select Value, the syntax allows you to:
Specify ranges of existing cells, and
Perform functions (nested, if required) on these cells.
=<command>(args[, ...])
where =<command>
)
is the operation to perform, and args
are
the arguments to use.
The available commands are:
sum – sums the arrays of cells specified
avg – calculates the average of arrays of cells
int – returns the integer portion of argument
diff – determines the difference between two arguments
div – divides two arguments
concatenate – concatenates all the specified cells
concatenate2 – concatenates all the specified cells, inserting pad character
min – determines minimum of specified arrays of cells
max – determines maximum of specified arrays of cells
The available arguments are:
Scalar – specifies a single-element value, either literal text or cell content.
To specify single-cell content, use this syntax:
$R<x>F<y>
where <x>
and <y>
are
(1-based) indexes into the cells. For example, $R4F5 specifies
record 4, field 5.
The special value 0 can be used as an index to indicate the current value. For example, if you are editing record 6, field 8, $R0F9 refers to record 6, field 9. This is especially useful for rules that edit a number of records or fields at once. This enables you to use a single rule to perform the same operation on a range of cells.
Array – specifies a range of cells, which could be one or two dimensional.
Array arguments use the single-cell syntax, combined so that a range of cells is specified. That is:
$R<x>F<y>[:R<x'>F<y'>]
If the second cell specifier is not present, the array consists of the single cell; if the second cell is specified, the array consists of all the cells in the indicated range. For example, $R5F2:R6F3 would mean records R5F2, R6F2, R5F3, R6F3 (that is, four cells). Again, using 0 as an index means use the current record or field.
If a function is expecting an array argument, a scalar
argument will be accepted and treated as a single cell array. However,
if a function is expecting a scalar argument, an array argument
will not be accepted.
For all functions, you can use the return value of another function as a valid argument.
Use the following commands described in this section in the <command>
portion
of the input when you specify a Value type rule.
Copyright © 2004. Sybase Inc. All rights reserved. |
![]() |