Skip to content
cicada edited this page Dec 7, 2022 · 17 revisions

title: Sub permalink: /Sub/

Arithmetic functions subtract(-)

syntax

  • sub(a, b)
  • a - b

definition

sub(a, b) or a - b results in the element-by-element subtraction of the values of data item b from the corresponding values of data item a.

applies to

Data items with Numeric or Point value type

conditions

  1. Domain units of the arguments must match or be void (literals or parameters can be subtracted from data data items of any domain).
  2. Arguments must have matching:

since version

5.15

example

1. attribute AminB (ADomain) := sub(A, B); 2. attribute AminB (ADomain) := A -B;

A B AminB
0 1 -1
1 -1 2
-2 2 -4
3.6 1.44 2.16
999 111 888

ADomain, nr of rows = 5

See also

Clone this wiki locally