Hi,

I understand right that (as I have asked before) an empty (ansi)string
is equal to NIL.

If this is correct, is setting a string to '' the same as setting the
string to NIL?

So i can e.g. use exchagably:

{$H+}
var
  s: string;
begin
  s := 'something';
  
  { this ... }
  s := '';
  { ... works equally to that: }
  s := NIL;

And more: is the memory consumed by the string freed using one of the
two methods?

TIA,
Marc


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

Reply via email to