LassoScript Utility
Basics Browse Detail

[Math_Add]

Tag Link [Math_Add] Category Math
Type Substitution Source Available No
Support Preferred Version 3.0
Change Unchanged Data Source Any
Output Type Decimal or Integer Security None
Implementation LCAPI Sets Lasso 8.5, Lasso 8.0, Lasso 7.0, Lasso 6.0, Lasso 5.0, Lasso 3.x

Description

[Math_Add] returns sum of multiple parameters. Each parameter is cast to an integer or decimal value and then added to the total. The result is an integer if all the parameters were integers or a decimal otherwise.

Equivalent to performing a series of operations using the + symbol except that the values passed in to the [Math_Add] tag are automatically cast to numeric values.

Syntax

[Math_AddInteger or Decimal Values]

Parameters

Required Parameters
Integer or Decimal Values Starting from the left, each successive value will be added to generate the final result.

Examples

To add several numbers:

Use the [Math_Add] tag. The following example adds five numbers. The result is an integer since all the parameters were integers.

[Math_Add: 1, 2, 3, 4, 5]

15