Returns the running sum of values of a type generated by another source.
Each value of the type is used as a tracking value that holds the subtotal. This allows you to collect information using a function call like this:
subtotal.mycustomers( #company, #days )
And access the subtotal like this:
@mycustomers.Acme == 365 -> print("Customer for a year")
By default subtotal() tracks its value in the variable @subtotal. Add a name qualifier as shown above to use another name.
| Data signatures |
|---|
| subtotal( type to subtotal: |
| Call signatures |
|---|
| subtotal( type to subtotal: Variable ǁ Function ǁ Header, value to subtotal: Variable ǁ Function ǁ Header ) |
| Purpose | Value |
|---|---|
| Main focus | subtotal() produces a calculated value |
| Context | Qualifier |
|---|---|
| Match qualifiers | onmatch |
| Value qualifiers | onmatch |
| Name qualifier | optionally expected |