Lasso Soft Inc. > Home

Decimal

The decimal data type represents positive or negative real numbers. Decimals are stored as 64-bit, double precision, floating point values.

Decimals are usually created as literals. Positive decimal literals are simply number which contain a decimal point such as 1.0, 34.5, or 5018.4563. Negative decimal literals must be surrounded by parentheses such as (-1.0), (-35.3), or (-1000000.0000001).

Decimals are always input using the American notation with a period . as the decimal point. Decimals are output using 6 digit precision. See the [Decimal->SetFormat] tag for information about alternate output formats.

Decimals can be manipulated using a number of mathematical symbols. For example, (1.0 + 1.0), (5.0 - 3.0), (2.5 * 3.6), or (10.0 / 5). An expression with a decimal on either side of the mathematical symbol will always return a decimal value.

Strings or integers can be cast to decimals using the [Decimal] tag. For example, [Decimal: 3] returns the decimal 3.0 and [Decimal: '7.333333'] returns the decimal 7.333333.

  • Syntax
  • Parameters
[Variable: 'myDecimal' = 7.4563]

[Variable: 'myDecimal' = (-3.14159)]

[Variable: 'myDecimal' = (Decimal: '1.3')]

[Variable: 'myDecimal' = (Decimal: 10)]

[Output: (10.1 / (-3.4))]

[Output: (3.14159 * 64)]
Examples

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

Tag Link Decimal Category Data Type
Type Data Type Data Source Any
Support Preferred Version 5.0
Output Type Security
Implementation Internal Sets Lasso 6.0, Lasso 5.0

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