Hpmbmath Object Usage

IntroductionQuick ReferencesHow Do I ... TopicsBuilt-in ToolsScripting and Programming

Hpmbmath dispatches a library of methods for performing multiple-precision integer operations. Your scripts create Hpmbmath object, then call the object methods to perform desired calculations. If you design to run your scripts under Hpmbcalc Scripting Host, you can use Hpmbmath as object name to call methods directly.

What do you want to know more about?


Use VBScript Under Hpmbcalc Scripting Host

Here are the general steps for invoking Hpmbmath methods using VBScript under Hpmbcalc:


Dim strOp1, strOp2, strRes
strOp1 =  "4b fc 3b 2f eb ba 0d ae"
strOp2 =  "78 f2 23 45 78 f2 23 45"
strRes = Hpmbmath.Add(strOp1, strOp2)

In order to invoke a method, you use Hpmbmath as object name. For example, above script shows how a VBScript program can access the Add method of a Hpmbmath object.


Use JScript Under Hpmbcalc Scripting Host

Here are the general steps for invoking Hpmbmath methods using JScript under Hpmbcalc:


var strOp1, strOp2, strRes
strOp1 =  "4b fc 3b 2f eb ba 0d ae"
strOp2 =  "78 f2 23 45 78 f2 23 45"
strRes = Hpmbmath.Add(strOp1, strOp2)

In order to invoke a method, you use Hpmbmath as object name. For example, above script shows how a JScript program can access the Add method of a Hpmbmath object.


Use VBScript Under Any Scripting Host

Here are the general steps for invoking Hpmbmath methods using VBScript under any Windows scripting host:


Dim strOp1, strOp2, strRes, objMath
strOp1 =  "4b fc 3b 2f eb ba 0d ae"
strOp2 =  "78 f2 23 45 78 f2 23 45"
Set objMath = CreateObject("Hpmbmath.Mparith")
strRes = objMath.Add(strOp1, strOp2)

In order to access a Hpmbmath object, you use the CreateObject function, where Hpmbmath is the name of the math engine supplying the object and Mparith is the type of object you want to create. Once the object is created, the script can use any of the exposed properties and methods defined for the object. For example, above script shows how a VBScript program can access the Add method of a Hpmbmath object.


Use JScript Under Any Scripting Host

Here are the general steps for invoking Hpmbmath methods using JScript under any Windows scripting host:


var strOp1, strOp2, strRes, objMath
strOp1 =  "4b fc 3b 2f eb ba 0d ae"
strOp2 =  "78 f2 23 45 78 f2 23 45"
objMath = new ActiveXObject("Hpmbmath.Mparith")
strRes = objMath.Add(strOp1, strOp2)

In order to access a Hpmbmath object, you use the ActiveXObject function, where Hpmbmath is the name of the math engine supplying the object and Mparith is the type of object you want to create. Once the object is created, the script can use any of the exposed properties and methods defined for the object. For example, above script shows how a JScript program can access the Add method of a Hpmbmath object.