Juha Manninen wrote:
Hi,

I have learned more about Lazarus / FPC by porting some Delphi code. It seems to be very usable now, I am impressed. I must admit I considered it as a hopeless project some years ago when I first noticed it. Not any more...

But first a minor complaint. I often get errors like:
  Error: Illegal type conversion: "ShortString" to "^Char"
or
Error: Call by var for arg no. 2 has to match exactly: Got "AnsiString" expected "ShortString"

if I don't add
  {$MODE DELPHI}
into a source file. However, I don't explicitly define any short strings. The default objfpc mode illogically thinks a "string" as function parameter is short string but other "string"s are dynamic ansistrings (or something like that). The language has evolved and short string is mostly a historical remain. I would suggest that MODE DELPHI is made default in Lazarus or then FPC's MODE OBJFPC is fixed.

Mode fpc is default for the compiler. If a unit is added by Lazarus it always contains {$mode objfpc}{$h+}

Marc


--
_______________________________________________
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

Reply via email to