Decimal.dec
Decimal.decx mc 
Group: Math
Documentation
Construct a Decimal from a Text, Integer or Float.
Arguments
- x: The- Text,- Integer, or- Floatto construct a- Decimalfrom.
- mc: The- Math_Contextto use to specify precision and- Rounding_Mode. If a- Math_Contextis used, there is a possibility of a loss of precision.
Errors
- If the Textargument is incorrectly formatted, aNumber_Parse_Erroris thrown.
- If the construction of the Decimal results in a loss of precision, a
Loss_Of_Numeric_Precisionwarning is attached. This can only happen if aMath_Contextvalue is explicitly passed.
^ Example
Create a Decimal from a Text.
c = dec "12.345"
^ Example
Create a Decimal from an Integer.
c = dec 12345
^ Example
Create a Decimal from a Float.
c = dec 12.345
Remarks
Number Format
The textual format for a Decimal is defined at https://docs.oracle.com/javase/8/docs/api/java/math/BigDecimal.html#BigDecimal-java.lang.String-.