How it works

The Instruction operation "subtract" can be used to subtract numerical inputs. Each input is subtracted in turn from the preceding input.

"Subtract" Examples

Example 1: Basic Subtraction

The example below shows how a number of inputs will be arithmetically subtracted. Notice how the subtraction starts at the first input working sequentially to the last input, so we have (22 - 5) - 3 = 14.

<instruction operation="subtract">
	<input value="22" />
	<input value="5" />
	<input value="3" />
</instruction>
14

"Add/Subtract" Examples

Example 1: Adding to a Subtraction's Result

In the example below we add the result of a number "20", to the result of a subtraction, arithmetically our equation would look like this, so we have 20 + (20 - 5) = 35.

<instruction xmlns="http://www.obyx.org">
            <input>
                    <instruction operation="add">
                        <input value="20" />
                        <input>
                            <instruction operation="subtract">
                                <input value="20" />
                                <input value="5" />
                            </instruction>
                        </input>
                    </instruction>
            </input>
</instruction>
35



Last Modified: Thu, 15 Jan 2015