From: nospam.andrew.logue@cdcgy.com (Andrew Logue)
Subject: Generics & Elaboration Order
Date: 2000/05/08
Date: 2000-05-08T00:00:00+00:00 [thread overview]
Message-ID: <8F2E930FAandrewloguecdcgycom@142.77.1.194> (raw)
Hello,
I need help to instantiate a generic package with an actual parameter whose
value must be determined at run-time.
Please take a peek at the following pseudo-code:
package body main is
Actual_Parameter : Boolean := False;
package New_Pack is new Generic_Package( Parameter => Actual_Parameter );
begin -- package elaboration code
if some_package.embedded_computer_type = some_package.type_A then
Actual_Parameter := True;
else
Actual_Parameter := False;
end if;
end main;
Given the above code, and the embedded computer type is type_A, will
New_Pack be instantiated with an Actual_Parameter value of True or False?
i.e. does the code in package body execute before the generic is
instantiated?
Thank you for your feedback,
Andrew Logue,
Computing Devices Canada.
next reply other threads:[~2000-05-08 0:00 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2000-05-08 0:00 Andrew Logue [this message]
2000-05-09 0:00 ` Generics & Elaboration Order Robert Dewar
2000-05-18 0:00 ` ANTHONY GAIR
2000-05-18 0:00 ` Robert A Duff
2000-05-19 0:00 ` ANTHONY GAIR
2000-05-21 0:00 ` Robert Dewar
2000-05-09 0:00 ` Robert A Duff
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox