|
Previous Top Next |
| Description
|
|
|
| The A-code has no fixed format, except that it starts with the letter 'A'. Normal arithmetic operations (+, -, *, /) are used. Constants are specified within quotes e.g. "12". Attribute numbers can be used BUT specific multi-value element numbers cannot be referenced. Specific multi-valued requirements must be defined as a field name 'N(fieldname)'. Field names can be used instead of attribute numbers to make the statement more legible.
|
|
|
|
|
| A;(1*10/"100") - will multiply attributes 1 and 10 and divide by a constant of 100. Remember when using Query Language reporting, the result will be an integer, in fact each attribute will be made into an integer BEFORE executing the statement.
|
|
|
| A;(N(QTY)*N(PRICE)/N(PER)) - will multiply the field defined as QTY by the field defined as PRICE and divide by the field defined as PER.
|
|
|
| The summate function will sum all multi-value elements in an attribute field:
|
|
|
| S(nn)
|
|
|
| where nn=attribute number or statement involving multi-values. Field names can be used in place of attribute numbers.
|
|
|
|
|
| AS(21) - will sum the attribute 21.
|
| AS(17*18/19) - will summate the results of the statement for each multi-value element in the attributes 17, 18 and 19.
|
| ASN(QTY) - will summate multi-values of field QTY.
|
|
|
| The remainder function gives the result of the remainder from a division:
|
|
|
| R(nn,mm)
|
|
|
| where nn=a constant or attribute to be divided into, mm=a constant or attribute divisor.
|
|
|
|
|
| A;((15/"12"):"ft.":R(15,"12"):"ins")
|
|
|
| The extract function is used to extract sub-strings:
|
|
|
| aa [nn, mm]
|
|
|
| where aa=the attribute to be used to extract from, nn is the position to start from and mm is the number of characters to extract.
|
|
|
| Other Operands that may be used include:
|
|
|
|
|
|
| Relational Operators can be used "=", ">=", "<=", ">", "<", "#" with the result being 0 if false and 1 if true.
|
|
|
|
|
| "1">="2" - results in 0.
|
| 1#"100" - results in 1 if attribute 1 contains the value 100 otherwise it will be 0.
|
|
|
|
|