Quote Originally Posted by jdarling
In case your lazy, my conversion of the pointers looks as follows:
C Source:
Code:
*((int*)pc) = (c1*3+c2) >> 2;
Pascal:[pascal]Longword(pc{$IFDEF DeReferenceOutPointers}^{$ENDIF}) := (c1*3+c2) shr 2;[/pascal]
The literal conversion of that C code would be
[pascal](PInteger(pc))^ := (c1 * 3 + c2) shr 2;[/pascal]
Note the dereference operator outside the parentheses, so it is dereferencing the typecasted pointer.