<< Prev        Next >>

ID : 626

- Operator

Function

To return the sign inversion, difference between numeric values or difference between vector type data elements.

Syntax

Sign inversion
- expression1

OR

Difference
expression2 - expression3

Guaranteed entry

expression1
Designate data to invert the sign. Designate numeric data.
expression2
Designate numeric data and vector type data.
expression3
Designate numeric data and vector type data.

Return value

Return data with inverted argument sign in case of single item, value difference in case of numeric values, or element value difference in case of vector type data.

Description

Either of the following types of operation is performed depending on argument combination.

Sign inversion

If data exist only on right-hand side of the operator, data sign is inverted.

Designate numeric data for argument. Vector type data cannot be designated.

Difference between numeric values

If data exist on both sides of the operator and data are numeric, the difference is returned.

Difference is obtained depending on data type with higher priority.

Difference between vector type data elements

The difference between vector type data elements in case the data on both sides of the operator are vector type data are calculated and vector type data are returned.

Dim aaa As Vector, bbb As Vector
aaa = V(100, 200, 300)
bbb = V(10, 20, 30)
PrintDbg aaa - bbb
' V(90, 180, 270) is output

Attention

- operation of string type data cannot be performed.

Example

-

ID : 626

<< Prev        Next >>