Forum: Object-Pascal / Delphi-Language
Delphi
by Mikkey,
2. Dez 2013
Don't worry with 256: Multiplying with 256 is the same as shifting left 8 bits.
You must invent some construct for the C-Case, bcse the Delphi case has implicit C-"break"s. Perhaps like:
if length = 11 then ...
if length >= 10 then ...
if length >= 9 then ...
...
Forum: Object-Pascal / Delphi-Language
Delphi
by Mikkey,
2. Dez 2013
In C Pointer and Array are nearly the same.
So k and *k lead to the same expression that is the character at the place where k points to.
char in C is defined as signed, so unsigned makes sense.
Translation to Delphi could be:
var v: Integer; {k: array of Shortint;}
begin