[fpc-pascal] Is it save to think default value of untouched string is ''?

Juha Manninen juha.manninen at phnet.fi
Sun Mar 7 00:13:05 CET 2010


> Sorry ... What ? It must be garanteed in ansistring mode! or
> everything will simple kboom! There is no way to initialize a non
> initialized string.

By initializing I mean:
  str:='';
or some other assignment.
I remember having garbage in strings in Delphi when I assumed they are empty.
Or was it only with function's string return value, I am not sure.
Anyway, after that I was careful to always assign my strings.

Maybe it is not true with FPC.


Juha Manninen
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20100307/edbb822b/attachment.html>


More information about the fpc-pascal mailing list