[fpc-devel] How to avoid Runtime error 231?
Dusan Halicky
dusan.halicky at gmail.com
Sun Jun 1 16:29:56 CEST 2008
Your example doesn't work, it still crash with runtime error:
dvh$ cat pokus2.pas
{$ifdef fpc}
{$mode delphi}
{$endif}
uses
SysUtils;
var a,b : variant;
begin
try
a := 'foo';
b := 5;
writeln(a+b); // here Runtime Error appear
except on Exception do
writeln('caught');
end;
writeln('other code');
// ... other code
end.
dvh$ fpc pokus2.pas
Free Pascal Compiler version 2.2.0 [2008/04/01] for i386
Copyright (c) 1993-2007 by Florian Klaempfl
Target OS: Linux for i386
Compiling pokus2.pas
pokus2.pas(20) Warning: Implicit uses of Variants unit
Linking pokus2
19 lines compiled, 0.2 sec
1 warning(s) issued
dvh$ ./pokus2
Runtime error 231 at $080543F4
$080543F4
$0807AF94
$0807904E
$08079BFD
$080556F1
$08089EC1
$
More information about the fpc-devel
mailing list