Lasso Soft Inc. > Home

[BigInt]

[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.

  • Syntax
  • Parameters
[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.
Examples

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

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

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