On 13.04.2016 19:50, Florian Klämpfl wrote: >> As I wrote in another mail a good solution would probably be for these >> kind of global variables to be initialized after all initialization >> sections have run and to have that documented like that. This way we >> avoid adding *another* potential pitfall with unit initializations. >> Functions that use such global variables could have a flag added which >> gets added recursively and thus we could warn in the initialization >> sections if such routines are used nevertheless. >> The latter could be also done in case we indeed don't do anything >> special with these records. This way the user would at least be warned... > > Just make a simple rule: custom managed types are initialized directly before > or after (to be > defined but I prefer before) the initialization part of the unit is run.
Fine. Regards, Sven _______________________________________________ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel