[fpc-pascal] Variable Initialization Questions

Mazola Winstrol mazofeifer at gmail.com
Wed Feb 17 17:47:47 CET 2016


Hello List,

After googled and searching in the documentation,

http://free-pascal-general.1045716.n5.nabble.com/does-Advanced-Record-constructor-automatically-zero-all-the-memory-space-of-that-record-td5716755.html
http://www.freepascal.org/docs-html/ref/refse23.html

i still have doubts about variable initialization:

1 - Does the compiler automatically initialize all class fields when a new
instance is created?
2 - Does the compiler initialize record fields?
3 - When i declare a pointer as a global variable or as a member of a
record, can i assume that its initial value is nil?
4 - Is there any compiler switch regarding initialization of variables?

Best regards
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20160217/1019234f/attachment.html>


More information about the fpc-pascal mailing list