Adriaan van Os wrote:
- "Lvalues" (the BP manual speaks of variable type casts here, but in fact it allows it also for things like `foo^', i.e. any lvalue) can be cast to a type whose size matches. (Of course, this is a portability issue, which BP doesn't care about, so it's up to the user to make sure that the size matches, e.g. casting something of type `Foo' to `array [1 .. SizeOf (Foo)] of Byte', or in the example above using `BitSizeOf (Double)' instead of 64.) In this case, the bit pattern is preserved, and the result is also an lvalue, i.e. can be used on both sides of an assignment etc.
There is the case of variable type casts of typeless var parameters (i.e. without a size match).
Oh yeah -- apparently the BP manual overlooks this case, but the compiler allows it. So will GPC. (Only as "variable", not value type-casts, of course.) Frank -- Frank Heckenbach, frank@g-n-u.de, http://fjf.gnu.de/, 7977168E GPC To-Do list, latest features, fixed bugs: http://www.gnu-pascal.de/todo.html GPC download signing key: 51FF C1F0 1A77 C6C2 4482 4DDC 117A 9773 7F88 1707