Function Math Symbolic Class

AddIntegersSymbolically

"Add Two Positive Integers Symbolically" Both numbers are passed via strings which have no arbitrary length limits.

Signature (Visual Basic / VBA)

Public Function AddIntegersSymbolically( _
      ByVal vNumOne As Variant _
    , ByVal vNumTwo As Variant _
    ) As Variant

Code Example

    ? AddIntegersSymbolically("123", "4567")
    4690
    ? AddIntegersSymbolically(123, "4567")
    4690
    ? AddIntegersSymbolically("12345678901234567890", "987654321987654321")
    13333333223222222211
    ? AddIntegersSymbolically("9238923892389238923898239823", "238978238728378232378238")
    9239162870627967302130618061
    ? AddIntegersSymbolically(Null, "2839839")
    Null

Parameters

Parameter Description
vNumOne First of two base-10 numeric strings which will be added symbolically. Function returns Null if vNumOne is Null or cannot be fixed up to a String. This string should represent an positive integer (it must have no sign nor floating-point portion); it should contain only the characters 0..9.
vNumTwo Second of two base-10 numeric strings which will be added symbolically. Function returns Null if vNumTwo is Null or cannot be fixed up to a String. Likewise, this string should represent an positive integer (it must have no sign nor floating-point portion); it should contain only the characters 0..9.

Return Value

Function returns the sum in the form of a numeric string.

Notes & Version History

Note This function does not ensure that the arguments vNumOne and vNumTwo contain only numeric digits (the characters from "0" through "9"). Its result is meaningless in such cases, and the result of this function in such cases is undefined.