Registriert seit: 7. Jun 2006
Ort: Karlsruhe
3.724 Beiträge
FreePascal / Lazarus
|
AW: C++ pointer to byte array --> Delphi
2. Dez 2013, 18:04
You ignored me
I believe I explained why the upcast is necessary.
I think in Delphi the upcast is done automatically by the compiler when the result is stored in a variable that is bigger than the operands.
Delphi-Quellcode:
var
b: Byte;
i: integer;
begin
b := 255;
i := b shl 2;
// i should now hold the value 510
end
|