Skip to content

Latest commit

 

History

History
39 lines (26 loc) · 3.33 KB

File metadata and controls

39 lines (26 loc) · 3.33 KB

subtotal()

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: $${\color{green}None}$$ ǁ $${\color{green}Any}$$, value to subtotal: $${\color{green}float}$$ ǁ $${\color{green}int}$$ )
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

[Back to index]