Skip to content

Modern Finance DecimalMaxValue

Paul Squires edited this page Oct 19, 2026 · 5 revisions

Home › Finance › Finance › DecimalMaxValue

DecimalMaxValue

Returns the largest value a Decimal can hold.

Syntax

DecimalMaxValue( )

Examples

#import "std/money"
using money

'' 2^96-1 at scale 0 -- the largest value the type holds
print DecimalMaxValue( ).ToString( )
'' 79228162514264337593543950335

'' all three mantissa limbs full
dim as Decimal m = DecimalMaxValue( )
print m.Lo( ); " "; m.Mid( ); " "; m.Hi( )
'' 4294967295 4294967295 4294967295

'' One past it is Invalid rather than a wrapped number
print ( DecimalMaxValue( ) + DecimalOne( ) ).IsValid( )    '' false

Library: Finance
Category: Finance
Documented under: Nothing Becomes A Keyword

Clone this wiki locally