[fpc-pascal] LongWord

Carsten Bager carsten at beas.dk
Mon May 7 14:15:44 CEST 2007


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

Regards carsten

---- The program ------------------------------------------------------------
program word32test;
{$RANGECHECKS ON}
{$OVERFLOWCHECKS ON}
{$S+ STACK CHECKING ON}
{$SMARTLINK ON}
{$TYPEINFO ON}
{$LONGSTRINGS OFF}


var
  a,b,c:longWord;

Begin
  a:=10;
  b:=5;
  writeLn('a=',a,'  b=',b);
  c:= a - b;
  writeLn('Resultat : ',c);
End.
--- The program output --------------------------
$ ./word32test
a=10  b=5
Runtime error 215 at $000081CC
  $000081CC  main,  line 17 of word32test.pp
  $000080F4


---- The compiler output --------------------------------

./makearm.shFpc/Pas/Linux/Test/Word32 #
+---------------------------------+
| CFG file ver. 1.00 d. 19/9-2006 |
+---------------------------------+
+---------------------------------+
| Cross compiling for ARM 9 Linux |
+---------------------------------+
+--------------+
| Standard lib |
+--------------+
Hint: End of reading config file /etc/fpc.cfg
Free Pascal Compiler version 2.0.4 [2006/08/29] for arm
Copyright (c) 1993-2006 by Florian Klaempfl
Target OS: Linux for ARM
Compiling word32test.pp
Assembling word32test
Assembling with smartlinking word32test
/Fpc/ArmBin/ar: creating libpword32test.a
Linking word32test
19 Lines compiled, 0.5 sec
Med venlig hilsen
Carsten Bager

BEAS A/S
Brørupvænget 10
DK-7650 Bøvlingbjerg
Tlf. : +45 9788 5222 Fax : +45 9788 5434
www.beas.dk





More information about the fpc-pascal mailing list