HP 3000 Manuals

TOTAL [ HP Business BASIC/XL Reference Manual ] MPE/iX 5.0 Documentation


HP Business BASIC/XL Reference Manual

TOTAL 

The TOTAL function is a Report Writer function that returns accumulated
totals.  The level number must match the level number of a TOTALS
statement.  The level number can be zero.  Zero accesses the GRAND TOTALS
statement.

Totals are always returned as REAL or DECIMAL numbers, depending on the
setting of OPTION REAL/DECIMAL in the report subunit.  If the current
subunit has a different setting, the value may be converted if used in an
expression.

Syntax 

TOTAL (level,sequence)

Parameters 

level            The summary level number.  This is in the range [0, 9].

sequence         Indicates which expression in the given TOTALS statement
                 should be returned.  The first expression is sequence
                 number one.  An error occurs if the sequence number is
                 less than one or greater than the number of expressions
                 in the TOTALS statement.

Examples 

     100  Tot = TOTAL(Level1,Seq)  !Tot receives the accumulated totals for the
     101                           !level specified by Level1, and the
     102                           !expression specified by Seq.



MPE/iX 5.0 Documentation