From: dewar@cs.nyu.edu (Robert Dewar)
Subject: Re: [Q]: Generic subprogram instantiation
Date: 1996/07/06
Date: 1996-07-06T00:00:00+00:00 [thread overview]
Message-ID: <dewar.836627508@schonberg> (raw)
In-Reply-To: m-bartz-0507961333140001@macgalois.ee.memst.edu
Michael wrote
" procedure sub_main is new sub_main(galois);"
GNAT is right to flag that, it is clearly illegal, since sub_main on the
right would refer to sub_main on the left if it was allowed to (which
it is not), and not to the outside sub_main. In fact the rule is that
sub_main is introduced by the declaration, but cannot be refrerenced
until the declaration is complete.
To rewrite this correctly, use appropriate qualiffication for the
sub_main reference on the right hand side to get the one you want!
next prev parent reply other threads:[~1996-07-06 0:00 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
1996-07-05 0:00 [Q]: Generic subprogram instantiation Michael Bartz
1996-07-06 0:00 ` Robert Dewar [this message]
1996-07-06 0:00 ` Robert A Duff
1996-07-11 0:00 ` Tucker Taft
1996-07-11 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