[fpc-devel] Are global variables guaranteed to be zero?
Mark Morgan Lloyd
markMLl.fpc-devel at telemetry.co.uk
Thu Nov 29 13:41:32 CET 2012
michael.vancanneyt at wisa.be wrote:
>>> You must initialize local variables.
>>
>> Are there cases where locals are set to a sane initial state, e.g. for
>> strings and dynamic arrays? What about (references to) objects?
>
> Managed types are normally initialized. That means Ansistrings,
> UnicodeString, and COM interfaces and dynamic arrays (maybe I forget some)
>
> Classes and objects are not.
By which I presume that (references to) objects are not set to nil, in
the same way that an integer or pointer wouldn't be set to zero or nil.
--
Mark Morgan Lloyd
markMLl .AT. telemetry.co .DOT. uk
[Opinions above are the author's, not those of his employers or colleagues]
More information about the fpc-devel
mailing list