Jonas,

On 7 mei 2007, at 14:15, Carsten Bager wrote:

I have written a small demo program that gives a runetime error when it
runs.
Is it the compiler or is it me?

See http://www.freepascal.org/mantis/view.php?id=8321 for a long discussion on this topic.

I think I have hit a similar case with the following code:

{$mode objfpc}{$H+}
program test; { FPC 2.0.4}
var
   w: Word;
begin
   w:= 5555;
   if lo(w) <> lo(w + (5 - 5)) then
      writeln('This is a little bit unexpected');
end.

What would you suggest as a "workaround"? Using the mod operator?

Regards, Bernd.
_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Reply via email to