A few weeks ago somebody (Martin?) suggested I got round an endianness issue by doing this:

type    WordLE= packed record b0, b1: byte; end;

operator := (wle: WordLE): word;

begin
..

It works well, except that attempting to use an assignment inside the operator definition immediately recurses: I've fixed this by using Move(), with operand sizes check by assertion.

Is it possible to tell the compiler that, for a code fragment like this, it is under no circumstances to attempt any implicit type conversions?

--
Mark Morgan Lloyd
markMLl .AT. telemetry.co .DOT. uk

[Opinions above are the author's, not those of his employers or colleagues]
_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Reply via email to