comp.lang.ada
 help / color / mirror / Atom feed
From: jsweet@ICS.UCI.EDU (Jerry Sweet)
Subject: Re: Preferred Style of use clause
Date: Sat, 2-Aug-86 17:40:30 EDT	[thread overview]
Date: Sat Aug  2 17:40:30 1986
Message-ID: <890.523402070@ics.uci.edu> (raw)


I think David Bakin really meant to ask about the semantic difference
between the two "use" clause placements, rather than the textual
appearance.  If I understand "with" and "use" clauses correctly, the
"use" clause applies only within the given lexical scope.  If it is
placed before the compilation unit, the identifiers introduced by the
"with" clause may be used without dot notation throughout the entire
compilation unit, including the formal parameters, if any.  If the
"use" clause is placed inside the compilation unit, then any formal
parameter types introduced by the context clause have to employ dot
notation.

Example 1:

with foo;
procedure bar(x: foo.zot) is...

Example 2:

with foo; use foo;
procedure bar(x: zot) is...


-jns

             reply	other threads:[~1986-08-02 21:40 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1986-08-02 21:40 Jerry Sweet [this message]
  -- strict thread matches above, loose matches on Subject: below --
1986-08-02 13:57 Preferred Style of use clause harbaughs
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox