On 16 jan 2007, at 14:04, Alexander Todorov wrote:

This code compiles with 2.0.4 but gives runtime error 231 .
program project1;

{$mode objfpc}{$H+}

uses Variants;

var V : Variant;
   S : String = 'test ';
begin
  V := 42;
  writeln(V);

  S := S + V; // fails here
  writeln(S);
end.

The reason is that it tries to convert S to a number rather than V to a string. The error is still in the current 2.1.1.


Jonas
_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Reply via email to