Chart for .NET / User's Guide / Data Manipulation / Functions / Math Functions / Subtract

In This Topic
    Subtract
    In This Topic
     Syntax
    SUB(arg1; arg2)
     Arguments
    Accepts two arguments, which may be either single values or arrays.
     Result
    If both arguments are single values, the result is a single value.
    If at least one of the arguments is an array, the result is also an array. The size of the result is equal to the size of the input array.
    If both of the arguments are arrays, the size of the result is equal to the size of the smallest input array.
     Description

    Each element of the result is the difference between the corresponding elements of the input arguments.

    Example 1:

    Expression: SUB(arg1; 5)

    arg1 5 7 3 2
    result 0 2 -2 -3

    Example 2:

    Expression: SUB(arg1; arg2)

    arg1 5 7 3 2
    arg2 4 6 6 0
    result 1 1 -3 2

    Example 3:

    Expression: SUB(0; arg1)

    arg1 5 7 3 2
    result -5 -7 -3 -2
     Related Examples

    Windows Forms: All Examples\Data Manipulation\Functions\Statistical\Basic Functions