Operator + (Addition)

Sums two expressions

result = lhs + rhs

The left-hand side expression to sum.
The right-hand side expression to sum.
Any pointer type.

Return Value:
Returns the sum of two expressions.

When the left and right-hand side expressions are numeric values, Operator + (Add) returns the sum of the two values.

When the left and right-hand side expressions are string values, Operator + (Add) concatenates the two strings and returns the result.

If an integral value n is added to a T Pointer type, the operator performs pointer arithmetic on the address, returning the memory position of a T value, n indices away (assuming n is within bounds of a contiguous array of T values). This behaves differently from numeric addition, because the Integer value is scaled by Sizeof( T ).

Neither operand is modified in any way.

This operator can be overloaded to accept user-defined types.

Dim n As Single
n = 4.75 + 5.25
Print n
will produce the output:


Dialect Differences:
Differences from QB:
See also:
Back to Arithmetic Operators
Back to Operators
Valid XHTML :: Valid CSS: :: Powered by WikkaWiki

sf.net phatcode