|
select attributesThese are used to select certain records from the current data set. Many of the ploticus procs support a select attribute.Examplesselect: @@2 = A (select all records where 2nd field is A) select: @@2 < 100 (select all records where 2nd field less than 100) select: @@group in C,D (select all records where the group field is C or D. this assumes that data fields have been given names)
select: @@group in C,D && @@sex = f
(select all records where the group field is C or D and
the sex field is f.
NotesAs seen in the above examples, two at-signs (@@) must be used when the select statement resides within a ploticus script and will be subjected to the script interpreter. Character constants should not be enclosed in quotes. Parentheses may not be used to establish precedence.OperandsOperands may be
Comparison operators
Data types: if both sides of a comparison are numeric, a numeric comparison will be done. Otherwise, a string comparison will be done. Wild card matching: Wild card matching may be done using like. Wild card characters are * which matches any number of any character, and ? which matches a single instance of any character. This matching is case-insensitive.
Commalist operators: these take a commalist on the right side.
Logical connectorsIndividual conditional expressions may be connected together using logical AND (&&) or OR (||). An entire expression may be negated by putting not: at the beginning of the expression.
Because parentheses may not be used to establish precedence
mixing AND and OR in the same expression requires care.
When the expression is parsed, it is first
split into OR terms, then each of the OR terms is split into AND terms.
For example: A = B and C = D or E = E of F = G would evaluate to true,
because it is interpreted as if it were written
(a = B and C = D) or (e = e) or (f = g).
It may be best to avoid mixing AND and OR in the same expression
and use multiple expressions instead.
Limitations and bugs
Because parentheses may not be used to establish precedence,
the mixing of AND and OR in the same expression is problematic (see above).
|
![]() data display engine Copyright Steve Grubb ![]() |