Revision history for KeyPgOpSubtract


Revision [22765]

Last edited on 2019-07-04 00:25:11 by fxm [merged the page POINTER (KeyPgPointer) within page PTR (KeyPgPtr)]
Additions:
[[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]]
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// )##.
Deletions:
[[KeyPgDeclare|declare]] [[KeyPgOperator|operator]] **-** ( [[KeyPgByref|byref]] //lhs// [[KeyPgAs|as]] //T// [[KeyPgPointer|Pointer]], [[KeyPgByref|byref]] //rhs// [[KeyPgAs|as]] //T// [[KeyPgPointer|Pointer]] ) [[KeyPgAs|as]] [[KeyPgInteger|integer]]
[[KeyPgDeclare|declare]] [[KeyPgOperator|operator]] **-** ( [[KeyPgByref|byref]] //lhs// [[KeyPgAs|as]] //T// [[KeyPgPointer|Pointer]], [[KeyPgByref|byref]] //rhs// [[KeyPgAs|as]] [[KeyPgInteger|integer]] ) [[KeyPgAs|as]] //T// [[KeyPgPointer|Pointer]]
If the left and right-hand side expressions are both of the ##//T// [[KeyPgPointer|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// [[KeyPgPointer|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// )##.


Revision [21604]

Edited on 2016-10-29 04:36:13 by fxm [Removed the two syntaxes (with LONGINT and ULONGINT) not true for 64-bit]
Deletions:
[[KeyPgDeclare|declare]] [[KeyPgOperator|operator]] **-** ( [[KeyPgByref|byref]] //lhs// [[KeyPgAs|as]] [[KeyPgLongint|longint]], [[KeyPgByref|byref]] //rhs// [[KeyPgAs|as]] [[KeyPgLongint|longint]] ) [[KeyPgAs|as]] [[KeyPgLongint|longint]]
[[KeyPgDeclare|declare]] [[KeyPgOperator|operator]] **-** ( [[KeyPgByref|byref]] //lhs// [[KeyPgAs|as]] [[KeyPgUlongint|ulongint]], [[KeyPgByref|byref]] //rhs// [[KeyPgAs|as]] [[KeyPgUlongint|ulongint]] ) [[KeyPgAs|as]] [[KeyPgUlongint|ulongint]]


Revision [21064]

Edited on 2016-03-13 08:43:20 by fxm [Formatting]
Additions:








Revision [20416]

Edited on 2016-02-10 16:05:41 by DkLwikki [Update link format]
Additions:
[[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]] [[KeyPgLongint|longint]], [[KeyPgByref|byref]] //rhs// [[KeyPgAs|as]] [[KeyPgLongint|longint]] ) [[KeyPgAs|as]] [[KeyPgLongint|longint]]
[[KeyPgDeclare|declare]] [[KeyPgOperator|operator]] **-** ( [[KeyPgByref|byref]] //lhs// [[KeyPgAs|as]] [[KeyPgUlongint|ulongint]], [[KeyPgByref|byref]] //rhs// [[KeyPgAs|as]] [[KeyPgUlongint|ulongint]] ) [[KeyPgAs|as]] [[KeyPgUlongint|ulongint]]
[[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// [[KeyPgPointer|Pointer]], [[KeyPgByref|byref]] //rhs// [[KeyPgAs|as]] //T// [[KeyPgPointer|Pointer]] ) [[KeyPgAs|as]] [[KeyPgInteger|integer]]
[[KeyPgDeclare|declare]] [[KeyPgOperator|operator]] **-** ( [[KeyPgByref|byref]] //lhs// [[KeyPgAs|as]] //T// [[KeyPgPointer|Pointer]], [[KeyPgByref|byref]] //rhs// [[KeyPgAs|as]] [[KeyPgInteger|integer]] ) [[KeyPgAs|as]] //T// [[KeyPgPointer|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//
If the left and right-hand side expressions are both of the ##//T// [[KeyPgPointer|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// [[KeyPgPointer|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// )##.
- In the //[[CompilerOptlang|-lang qb]]// dialect, this operator cannot be overloaded.
- [[CatPgMath|Mathematical Functions]]
Deletions:
[[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]] [[KeyPgLongint longint]], [[KeyPgByref byref]] //rhs// [[KeyPgAs as]] [[KeyPgLongint longint]] ) [[KeyPgAs as]] [[KeyPgLongint longint]]
[[KeyPgDeclare declare]] [[KeyPgOperator operator]] **-** ( [[KeyPgByref byref]] //lhs// [[KeyPgAs as]] [[KeyPgUlongint ulongint]], [[KeyPgByref byref]] //rhs// [[KeyPgAs as]] [[KeyPgUlongint ulongint]] ) [[KeyPgAs as]] [[KeyPgUlongint ulongint]]
[[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// [[KeyPgPointer Pointer]], [[KeyPgByref byref]] //rhs// [[KeyPgAs as]] //T// [[KeyPgPointer Pointer]] ) [[KeyPgAs as]] [[KeyPgInteger integer]]
[[KeyPgDeclare declare]] [[KeyPgOperator operator]] **-** ( [[KeyPgByref byref]] //lhs// [[KeyPgAs as]] //T// [[KeyPgPointer Pointer]], [[KeyPgByref byref]] //rhs// [[KeyPgAs as]] [[KeyPgInteger integer]] ) [[KeyPgAs as]] //T// [[KeyPgPointer 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//
If the left and right-hand side expressions are both of the ##//T// [[KeyPgPointer 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// [[KeyPgPointer 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// )##.
- In the //[[CompilerOptlang -lang qb]]// dialect, this operator cannot be overloaded.
- [[CatPgMath Mathematical Functions]]


Revision [17457]

Edited on 2015-03-25 09:00:08 by CountingPine [Remove integer overloads apart from [u]integer/[u]longint]
Deletions:
[[KeyPgDeclare declare]] [[KeyPgOperator operator]] **-** ( [[KeyPgByref byref]] //lhs// [[KeyPgAs as]] [[KeyPgByte byte]], [[KeyPgByref byref]] //rhs// [[KeyPgAs as]] [[KeyPgByte byte]] ) [[KeyPgAs as]] [[KeyPgByte byte]]
[[KeyPgDeclare declare]] [[KeyPgOperator operator]] **-** ( [[KeyPgByref byref]] //lhs// [[KeyPgAs as]] [[KeyPgUbyte ubyte]], [[KeyPgByref byref]] //rhs// [[KeyPgAs as]] [[KeyPgUbyte ubyte]] ) [[KeyPgAs as]] [[KeyPgUbyte ubyte]]
[[KeyPgDeclare declare]] [[KeyPgOperator operator]] **-** ( [[KeyPgByref byref]] //lhs// [[KeyPgAs as]] [[KeyPgShort short]], [[KeyPgByref byref]] //rhs// [[KeyPgAs as]] [[KeyPgShort short]] ) [[KeyPgAs as]] [[KeyPgShort short]]
[[KeyPgDeclare declare]] [[KeyPgOperator operator]] **-** ( [[KeyPgByref byref]] //lhs// [[KeyPgAs as]] [[KeyPgUshort ushort]], [[KeyPgByref byref]] //rhs// [[KeyPgAs as]] [[KeyPgUshort ushort]] ) [[KeyPgAs as]] [[KeyPgUshort ushort]]


Revision [16910]

Edited on 2013-08-05 03:14:27 by FxMwikki [Added the case to subtract an integer from a pointer (and not the opposite)]
Additions:
If an integral value ##//n//## is subtracted from a ##//T// [[KeyPgPointer 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// )##.


Revision [16909]

Edited on 2013-08-05 02:38:36 by FxMwikki [Added the syntax to subtract an integer from a pointer (and not the opposite)]
Additions:
[[KeyPgDeclare declare]] [[KeyPgOperator operator]] **-** ( [[KeyPgByref byref]] //lhs// [[KeyPgAs as]] //T// [[KeyPgPointer Pointer]], [[KeyPgByref byref]] //rhs// [[KeyPgAs as]] [[KeyPgInteger integer]] ) [[KeyPgAs as]] //T// [[KeyPgPointer Pointer]]


Revision [16584]

Edited on 2013-02-04 01:01:42 by CountingPine [List/explain pointer-pointer subtraction among overloads]
Additions:
[[KeyPgDeclare declare]] [[KeyPgOperator operator]] **-** ( [[KeyPgByref byref]] //lhs// [[KeyPgAs as]] //T// [[KeyPgPointer Pointer]], [[KeyPgByref byref]] //rhs// [[KeyPgAs as]] //T// [[KeyPgPointer Pointer]] ) [[KeyPgAs as]] [[KeyPgInteger integer]]
If the left and right-hand side expressions are both of the ##//T// [[KeyPgPointer 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// )##.
Deletions:
If either the left or right-hand side expressions is of [[KeyPgPointer Pointer]] type, **##Operator -## (Subtract)** performs pointer arithmetic on the address, returning the result.
SLEEP


Revision [12415]

The oldest known version of this page was created on 2008-01-18 14:23:12 by JeffMarshall [List/explain pointer-pointer subtraction among overloads]
Valid XHTML :: Valid CSS: :: Powered by WikkaWiki



sf.net phatcode