Michael Van Canneyt schreef:

On Thu, 26 Oct 2006, Judison wrote:

It would be nice if {$mode objfpc} makes {$H+} automatic...

It has been considered once, but I can't remember why it was
not put in effect, there was some reason, but I don't recall why :(


Maybe because existing code assume strings in objfpc are shortstrings.

If this were to change, that code might break.

program test;
{$mode objfpc}
var
  s: string;
begin
  s:='test';
  writeln(length(s)); // resilient to string type change
  writeln(ord(s[0])); // this breaks, I think.
end.

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

Reply via email to