Unary Plus: +

Syntax

+ op

Input parameters

op

the operand

Examples of valid syntaxes

+ DS_1
+ 3

Semantics for scalar operations

The operator + returns the operand unchanged. For example:

+3 gives 3
+(-5) gives -5

Input parameters type

op:

dataset { measure<number> _+ }
| component<number>
| number

Result type

result:

dataset { measure<number> _+ }
| component<number>
| number

Additional Constraints

None.

Behaviour

The operator has the behaviour of the “Operators applicable on one Scalar Value or Data Set or Data Set Component” (see the section “Typical behaviours of the ML Operators”). According to the general rules about data types, the operator can be applied also on sub-types of number, that is the type integer. If the type of the operand is integer then the result has type integer. If the type of the operand is number then the result has type number.

Examples

Given the operand Data Set DS_1:

Input DS_1 (see structure)

Id_1

Id_2

Me_1

Me_2

10

A

1.0

5

10

B

2.3

10

11

A

3.2

12

Example 1

DS_r := + DS_1;

results in (see structure):

DS_r

Id_1

Id_2

Me_1

Me_2

10

A

1.0

5

10

B

2.3

10

11

A

3.2

12

Example 2

DS_r := DS_1 [ calc Me_3 := + Me_1 ];

results in (see structure):

DS_r

Id_1

Id_2

Me_1

Me_2

Me_3

10

A

1.0

5

1.0

10

B

2.3

10

2.3

11

A

3.2

12

3.2