Operator - (Subtract)

Subtracts two expressions

Syntax
	KeyPgDeclareDeclare KeyPgOperatorOperator - ( KeyPgByrefByRef lhs KeyPgAsAs KeyPgIntegerInteger, KeyPgByrefByRef rhs KeyPgAsAs KeyPgIntegerInteger ) KeyPgAsAs 
	KeyPgIntegerInteger
	KeyPgDeclareDeclare KeyPgOperatorOperator - ( KeyPgByrefByRef lhs KeyPgAsAs KeyPgUintegerUInteger, KeyPgByrefByRef rhs KeyPgAsAs KeyPgUintegerUInteger ) KeyPgAsAs 
	KeyPgUintegerUInteger

	KeyPgDeclareDeclare KeyPgOperatorOperator - ( KeyPgByrefByRef lhs KeyPgAsAs KeyPgSingleSingle, KeyPgByrefByRef rhs KeyPgAsAs KeyPgSingleSingle ) KeyPgAsAs KeyPgSingleSingle
	KeyPgDeclareDeclare KeyPgOperatorOperator - ( KeyPgByrefByRef lhs KeyPgAsAs KeyPgDoubleDouble, KeyPgByrefByRef rhs KeyPgAsAs KeyPgDoubleDouble ) KeyPgAsAs KeyPgDoubleDouble

	KeyPgDeclareDeclare KeyPgOperatorOperator - ( KeyPgByrefByRef lhs KeyPgAsAs T KeyPgPtrPointer, KeyPgByrefByRef rhs KeyPgAsAs T KeyPgPtrPointer ) KeyPgAsAs 
	KeyPgIntegerInteger
	KeyPgDeclareDeclare KeyPgOperatorOperator - ( KeyPgByrefByRef lhs KeyPgAsAs T KeyPgPtrPointer, KeyPgByrefByRef rhs KeyPgAsAs KeyPgIntegerInteger ) KeyPgAsAs T 
	KeyPgPtrPointer

	KeyPgDeclareDeclare KeyPgOperatorOperator - ( KeyPgByrefByRef lhs KeyPgAsAs T, KeyPgByrefByRef rhs KeyPgAsAs T ) KeyPgAsAs KeyPgIntegerInteger
	KeyPgDeclareDeclare KeyPgOperatorOperator - ( KeyPgByrefByRef lhs KeyPgAsAs T, KeyPgByrefByRef rhs KeyPgAsAs KeyPgIntegerInteger ) KeyPgAsAs T
	KeyPgDeclareDeclare KeyPgOperatorOperator - ( KeyPgByrefByRef lhs KeyPgAsAs KeyPgIntegerInteger, KeyPgByrefByRef rhs KeyPgAsAs T ) KeyPgAsAs T

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 the left and right-hand side expressions are both of the T KeyPgPtrPointer 
	type, for some type T, the operator performs pointer subtraction on the 
	address, returning the result.  This is different from numeric 
	subtraction because the difference is divided by KeyPgSizeofSizeOf( T ).

	If an integral value n is subtracted from a T KeyPgPtrPointer type, the operator 
	performs pointer arithmetic on the address, returning the memory 
	position of a T value, n indices before (assuming (-n) is within bounds 
	of a contiguous array of T values).  This behaves differently from 
	numeric subtraction, because the KeyPgIntegerInteger value is scaled by KeyPgSizeofSizeOf( T ).

	Neither operand is modified in any way.

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

Example
	Dim n As Single
	n = 4 - 5
	Print n

	will produce the output:


	-1

Dialect Differences
	* In the CompilerOptlang-lang qb dialect, this operator cannot be overloaded.

Differences from QB
	* None

See also
	* CatPgMathMathematical Functions

