Math: CurrencyMulMBS

Online Documentation   -   Statistics   -   FAQ   -   Plugin Parts (All, Dependencies)   -   Class hierarchy

New in Version 22.2 22.3 22.4 22.5 23.0 23.1 23.2 23.3 23.4 23.5 24.0 24.1

The list of the   topics,   classes,   interfaces,   controls,   modules,   global methods by category,   global methods by name,   screenshots,   licenses   and   examples.

Platforms to show: All Mac Windows Linux Cross-Platform

CurrencyMulMBS(value1 as Currency, value2 as Integer) as Currency

Type Topic Plugin Version macOS Windows Linux iOS Targets
global method Math MBS Util Plugin 14.3 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Multiplies currency value with integer.
Example
dim c1 as Currency =    1234567890.1234

// in xojo
dim c3 as Currency = c1 * 12345

// with plugin
dim c4 as Currency = CurrencyMulMBS(c1, 12345)

// verify by 64bit math
dim c5 as Int64 = 12345678901234
dim c6 as int64 = c5 * 12345

// and plugin is correct
MsgBox str(c3)+" "+str(c4)+" "+str(c6)

This function uses 64bit integer math to avoid rounding issues.

The items on this page are in the following plugins: MBS Util Plugin.


💬 Ask a question or report a problem