Lasso Soft Inc. > Home

[ integer->+ ]

Method

+ adds the value of the right parameter to the value of the left parameter and returns the resulting value. 

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

This symbol performs string concatenation if either parameter is a string. The result is the left parameter followed by the right parameter.

Note for Lasso versions before Lasso 9: 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)).

  • Syntax
left parameter + right parameter
Examples
  • Beginner

To perform an integer addition

Code

10 + 2

Result

12

To perform a decimal addition

Code

10 + 3.0

Result

13.000000

To perform a string concatenation

Each string will be concatenated in order:

Code

'Hello' + 'World'

local(v1 = 'Hello', v2 = 'World', v3 = ' ')
(#v1 + #v3 + #v2)

Result

HelloWorld
Hello World

Recent Comments

No Comments found

Please note that periodically LassoSoft will go through the notes and may incorporate information from them into the documentation. Any submission here gives LassoSoft a non-exclusive license and will be made available in various formats to the Lasso community.

LassoSoft Inc. > Home

 

 

©LassoSoft Inc 2015 | Web Development by Treefrog Inc | PrivacyLegal terms and Shipping | Contact LassoSoft