LassoScript Utility
Basics Browse Detail

-= Subtraction Assignment

Tag Link -= Subtraction Assignment Category Symbol
Type Symbol Source Available No
Support Preferred Version 5.0
Change Unchanged Data Source Any
Output Type None 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 sets the left parameter to the resulting value. The left parameter should be a variable that contains a string, decimal, or integer 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 th right parameter from the left parameter if either parameter is a string value. The result is a string value.

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


[(Variable: 'Left_Parameter') -= Right Parameter]

(Variable: 'Left_Parameter') -= Right_Parameter;

$Left_Parameter -= Right_Parameter;


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


To subtract a value from a variable:

Use the subtraction assignment symbol -=. The value will be subtracted from the symbol and no result will be returned to the format file. The following example subtracts 5 from the variable Result. The value of the variable is then displayed.

  Variable: 'Result'=10;
  $Result -= 5;
  Output: $Result;