Sub
This shard subtracts the value provided in the Operand parameter from the input value.
Examples
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45 | ; _SubFlow container shard + nesting
5 | Log("input to Sub1") ; => 5
{
Math.Multiply(2)
Assert.Is(10 Break: true)
Log("Sub1 inner shard o/p | 5 * 2") ; => 10
}
Log("Sub1 output => input to Sub2") ; => 5
{
Math.Multiply(3)
Assert.Is(15 Break: true)
Log("Sub2 inner shard o/p | 5 * 3") ; => 15
Log("input to nested-_SubFlow") ; => 15
{
Math.Multiply(2)
Assert.Is(30 Break: true)
Log("nested-_SubFlow inner shard o/p | (5 * 3) * 2") ; => 30
}
Log("output from nested _SubFlow") ; => 15
}
Log("Sub2 output => output") ; => 5
; Using Sub, with multiple operations
5 ; input to Sub shards
{
Math.Multiply(2)
Log ; 5 * 2 => 10
}
{
Math.Multiply(3)
Log ; 5 * 3 => 15
{
Math.Multiply(2)
Log ; 15 * 2 => 30
}
}
Log("output of the last Sub shard") ; input is output => 5
|
[info] [sample-wire] input to Sub1: 5
[info] [sample-wire] Sub1 inner shard o/p | 5 * 2: 10
[info] [sample-wire] Sub1 output => input to Sub2: 5
[info] [sample-wire] Sub2 inner shard o/p | 5 * 3: 15
[info] [sample-wire] input to nested-_SubFlow: 15
[info] [sample-wire] nested-_SubFlow inner shard o/p | (5 * 3) * 2: 30
[info] [sample-wire] output from nested _SubFlow: 15
[info] [sample-wire] Sub2 output => output: 5
[info] [sample-wire] 10
[info] [sample-wire] 15
[info] [sample-wire] 30
[info] [sample-wire] output of the last Sub shard: 5