LassoScript Utility
Basics Browse Detail


Tag Link [BigInt] Category Math
Type Substitution Source Available Yes
Support Preferred Version 8.5
Change New Data Source Any
Output Type BigInt Security None
Implementation Sets Lasso 8.5


[BigInt] is a data type which allows integer values larger than 64 bits to be manipulated using Lasso. The maximum value representable by the built-in integer type is 9,223,372,036,854,775,807 (positive or negative). Since manipulating numbers larger than this is not usually required, the built-in integer data type should be used when possible.

A big integer is created by casting a string using [BigInt: '1000']. It is also possible to cast integer and decimal values to big integers, but care should be taken that the number is not modified by Lasso before the big integer is created. In general, it is safest to use a string to represent the value.

Big integers support the + - * symbols for basic math with no loss of precision. The big integer should always occur on the left side of the symbol in order to ensure that the result is a big integer.

The / symbol is also supported for division, however since floating point is used in the calculation it is possible to lose precision in division operations. The % symbol is not supported for big integers.

Big integers can be cast to string and the [BigInt->(SetFormat: -GroupChar=',')] tag can be used to output the value with comma delimiters every three positions. Big integers can also be cast to decimal or integer values, but some loss of precision may occur.


[BigInt: '10000000000000000000']

[(BigInt: '10000000000000000000')->(SetFormat: -GroupChar=',') &]

[(BigInt: '10000000000000000000') * 2]

[(BigInt: '10000000000000000000') * 2.5]

[(BigInt: '10000000000000000000') + 150000]

[(BigInt: '10000000000000000000') - 150000]


Optional Parameters
String Value A string which will be parsed into a big integer.


See the Lasso 8 Language Guide for examples of how to use this tag.