HP 3000 Manuals

Syntax Rules For Calculations [ HP ALLBASE/BRW Reference Manual ] MPE/iX 5.0 Documentation


HP ALLBASE/BRW Reference Manual

Syntax Rules For Calculations 

The following general rules apply when defining calculations for all
types of HP ALLBASE/BRW formulas and conditions.  Note that all formulas
and conditions are examined by HP ALLBASE/BRW after you enter them, so
that misspellings, type conflicts, and other errors will be immediately
found.

Rules For Formulas and Conditions 

   *   No item with the same name as an HP ALLBASE/BRW reserved word can
       be used in a calculation.  A list of HP ALLBASE/BRW reserved words
       is supplied later in this chapter.

   *   An item, calculated item, and function can all have the same name,
       but if so HP ALLBASE/BRW uses a priority to determine to which
       item the name refers.  (See "Arguments" section in this chapter.
       However, no two items, or no two functions can have the same name.

   *   Items, calculated items, functions, and arrays must all follow the
       HP ALLBASE/BRW rules for names.  That is, they cannot exceed 20
       characters; must start with a letter, $, # or @; they can then be
       followed by up to 19 characters; and they cannot contain points,
       parentheses, spaces or commas.  (Letters, digits, and dashes are
       allowed).

   *   A calculation, whether a formula or condition, can be up to two
       screen pages long.  You can have calculations that spread over
       more than two pages by defining part of the calculation as a
       function (or by putting part of the calculation in a separate
       calculated item) and then calling it from within the calculation.

   *   You can break calculations over more than one line.  You can
       insert new lines or comments anywhere on a calculation screen
       except in the middle of names and in strings.

   *   Argument names and reserved words can be written in any
       combination of uppercase and lowercase characters.  That is,
       except in strings, HP ALLBASE/BRW will not differentiate between
       and uppercase and lowercase characters.

   *   You must leave at least one blank space between operators and
       their arguments.  (HP ALLBASE/BRW lets you include characters such
       as -, /, and & in the middle of names).

   *   You can add comments between double angle-brackets:  for example:
       <<comments>>.

   *   You can use all the terminal editing keys to edit a calculation.

   *   If you cannnot immediately correct an error in a formula, press
       the function key Exit Save, which is displayed on all Formula and
       Condition screens if the system detects an error in the formula.
       HP ALLBASE/BRW saves the formula unchanged for later correction.



MPE/iX 5.0 Documentation