Skip to content

Modern Finance MoneyRound

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

Home › Finance › Finance › MoneyRound

MoneyRound

Rounds a Decimal by a policy, or returns it unchanged if the policy does not round.

Syntax

MoneyRound( value, policy )

Examples

#import "std/money"
using money

'' Applies a policy.  With RoundEach_ false it returns the value whole,
'' which is what makes an analytical run possible without a second code
'' path through every schedule.
dim as Decimal d = DecimalParse( "1234.5678" ).Value( )

print MoneyRound( d, MoneyRoundingCents( ) ).ToString( )        '' 1234.57
print MoneyRound( d, MoneyRoundingBankersFour( ) ).ToString( )  '' 1234.5678
print MoneyRound( d, MoneyRoundingExact( ) ).ToString( )        '' 1234.5678

Library: Finance
Category: Finance
Documented under: Nothing Becomes A Keyword
Source: pkg/std/money/fincore.tiko in the tiko repository.

Clone this wiki locally