_________________________________________________________________________________________________________
Typecasts
___________________________________________________________________
Value typecasts cannot be used on the left side of assignments, as variable typecasts. Here are some valid typecasts:
Byte('A')
Char(48) boolean(1) longint(@Buffer) |
In general, the type size of the expression and the size of the type cast must be the same. However, for ordinal types (byte, char, word, boolean, enumerateds) this is not so, they can be used interchangeably. That is, the following will work, although the sizes do not match.
Integer('A')
Char(4875) boolean(100) Word(@Buffer) |
This is compatible with Delphi or Turbo Pascal behaviour.