LassoScript Utility
Basics Browse Detail

[Decimal_SetGlobalDefaultPrecision]

Tag Link [Decimal_SetGlobalDefaultPrecision] Category Math
Type Process Source Available No
Support Preferred Version 8.6
Change New Data Source Any
Output Type None Security None
Implementation LCAPI Sets Lasso 8.5

Description

Use [Decimal_SetGlobalDefaultPrecision] to globally set the output precision for [Decimal] types. Global precision can be overridden using [Decimal->setFormat].

Syntax

[Decimal_SetGlobalDefaultPrecision(Integer)]

Parameters

Required Parameters
Integer The number of decimal places to be shown in output of a [Decimal] type.

Change Notes

This tag was added in Lasso 8.6.0.1.

Examples

To globally set decimal precision:

Specify how many decimal places to show with [Decimal_SetGlobalDefaultPrecision(Integer)]. The following example demonstrates how Decimal types are printed before and after using the tag.

74.0 + 0.232; // 74.232000
Decimal_SetGlobalDefaultPrecision(2);
74.0 + 0.232;

74.23