company logo

2.2. Operation - Access functions - operations

Operations are provided as unary or binary operations in C++. High level languages, which do not support operator overloading, use appropriate function names, which are described in "Language specific programming rules". In .net languages, operations are available by corresponding functions.

Binary operations are provided as self-operations (e.g. += or =), which return the result in the right operand, as ordinary binary operations returning the result in a temporary value handle on the stack or as Boolean operations returning a Boolean value directly. Unary operation return the result in a temporary value handle or directly as Boolean value.

In order to refer to to an unary or ordinary binary operation result, the result has to be assigned to another value handle or passed to a function as parameter. Otherwise, the result is lost.

Performing an operation requires, that value instances are selected in participating operands. Otherwise, the operation throws an exception.

  a += b;    // result in a

  c = a + b; // result in c

  func(a+b); // result passed to function

  a + b;     // result is lost

Functions