LassoScript Utility
Basics Browse Detail

- Subtraction (Deletion)

Tag Link - Subtraction (Deletion) Category Symbol
Type Symbol Source Available No
Support Preferred Version 5.0
Change Unchanged Data Source Any
Output Type String, Decimal, or Integer Security None
Implementation LCAPI Sets Lasso 8.5, Lasso 8.0, Lasso 7.0, Lasso 6.0, Lasso 5.0


- subtracts the value of the right parameter from the left parameter and returns the resulting value.

This symbol performs mathematical subtraction if both parameters contain decimal or integer values. The result will be a decimal if either parameter is a decimal value.

This symbol deletes the substring defined by the right parameter from the left parameter if either parameter is a string value. The result is a string value.

The subtraction symbol can also be used as a unary operator to change the sign of a number to negative. When used in this way it should only be used with integer or decimal literals and should be surrounded by parentheses when necessary to make its use clear. For example, (-4) or (-8.5).

Note: If the parameter on the right hand side of the symbol is a negative literal it should be surrounded by parentheses. For example, (4 - (-1)).


[Output: Left_Parameter - Right_Parameter]

Output: Left_Parameter - Right_Parameter;

[Variable: 'Result'=Left_Parameter - Right_Parameter]

(Variable: 'Result') = Left_Parameter - Right_Parameter;

$Result = Left_Parameter - Right_Parameter;


Required Parameters
Left_Parameter The value from which the other value should be subtracted.
Right_Parameter The value to be subtracted.


To output the difference between two values:

Use the subtraction symbol -. The following example outputs the result of subtracting 5 from 10.

[Output: 10 - 5]