Operator - (Subtract)
Subtracts two expressions
Syntax:
Usage:
result = lhs - rhs
Parameters:
lhs
The left-hand side expression to subtract from.
rhs
The right-hand side expression to subtract.
T
Any pointer type.
Return Value:
Returns the subtraction of two expressions.
Description:
When the left and right-hand side expressions are numeric values, Operator - (Subtract) returns the subtraction of the two values.
If either the left or right-hand side expressions is of
Pointer type,
Operator - (Subtract) performs pointer arithmetic on the address, returning the result.
Neither operand is modified in any way.
This operator can be overloaded to accept user-defined types.
Examples:
Dim n As Single
n = 4 - 5
Print n
Sleep
will produce the output:
Dialect Differences:
- In the -lang qb dialect, this operator cannot be overloaded.
Differences from QB:
See also:
There are no comments on this page. [Add comment]