That is incorrect. The unit order in a DPR is only half the story. For
example, if you use SysUtils and Classes, no matter how you order then, you
will find that SysUtils still gets instantiated first. Unit dependency
determines the order. Another example, if you have unit1 and unit2 in your
DPR file. If unit1 comes before unit2, you would normally expect that unit1
gets initialised before unit2. However, if unit1 uses unit2, you will find
that unit2 gets initialised first!
It gets very interesting when 2 units use each other. In that case, it may
be possible for the initialization code of one unit to call code in another
unit that has not been initialised yet!
Regards,
Dennis.
> -----Original Message-----
>
> >1. Initialisation sections for all units run in a somewhat
> arbitrary order
> >based on which units use which.
>
> My recollection is that the "arbitrary order" chosen exactly matches
> the order of the uses clauses in the .dpr!
---------------------------------------------------------------------------
New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
Website: http://www.delphi.org.nz
To UnSub, send email to: [EMAIL PROTECTED]
with body of "unsubscribe delphi"