All Commands
All Math & Logic
Commands
TOT
Display a Total
To save setting up variables just for the purpose of keeping track of a total of values, UDB includes some predefined variables for this purpose. They are simply numbered from 1 onwards and can be added to by using the EVAL command or the 'total' parameter in the OBJ_DATA or FORMAT_NUM command and reset using the TOT_RESET command.
Number | Name | Default | Type | Description |
---|---|---|---|---|
1 | id | 0 | Integer | The number of the Total to display |
2 | dec | -1 | Integer | Format the number to n decimal places. -1 will prevent formatting and output the value as is. |
3 | dynamic | false | Boolean | Specify that the value may be changed dynamically. This will cause an HTML span tag to be placed around the value when output. Use this with the {OBJ()} command to add values to the total when the user clicks the checkbox. |
- | thou | String | Thousand Separator. Only works if decimal places are 0 or more. |
Example
10 20
10 30