tag:blogger.com,1999:blog-4434108347727659251.post2048318793340554793..comments2022-06-29T08:53:03.580+02:00Comments on Compas Pascal: Delphi interfaces and implementationUnknownnoreply@blogger.comBlogger3125tag:blogger.com,1999:blog-4434108347727659251.post-201306750951773152007-12-13T14:23:00.000+01:002007-12-13T14:23:00.000+01:00I made some tests, and as long as you don't have r...I made some tests, and as long as you don't have recursive dependencies between units, initialization sections are executed in correct order.Lars Dhttps://www.blogger.com/profile/06217303713945608384noreply@blogger.comtag:blogger.com,1999:blog-4434108347727659251.post-15323550815158819592007-12-12T22:58:00.000+01:002007-12-12T22:58:00.000+01:00Have to disagree - it should be:Never use the inte...Have to disagree - it should be:<BR/><BR/>Never use the interface uses section for anything that isn't strictly needed in the interface.<BR/><BR/>And never, ever, rely on unit initialization order.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-4434108347727659251.post-45246729624518790632007-12-12T21:02:00.000+01:002007-12-12T21:02:00.000+01:00Never use the uses clause in the implementation se...Never use the uses clause in the implementation section for anything except avoiding circular references.<BR/><BR/>There is no guarenteed order of unit initialization in the implementation uses, and if you reference anything from such a unit in the initialization section, that unit could be as yet uninitialized.<BR/><BR/>Only units listed in the implementation uses clause are guarenteed to be Anonymousnoreply@blogger.com