comp.lang.ada
 help / color / mirror / Atom feed
* Preferred Style of use clause
@ 1986-08-02 13:57 harbaughs
  0 siblings, 0 replies; 2+ messages in thread
From: harbaughs @ 1986-08-02 13:57 UTC (permalink / raw)


From:	HARBAUGHS     2-AUG-1986 08:55
To:	MAILER!BAKIN@MIT-MULTICS,HARBAUGHS   
Subj:	preferred style of use clause

My preference is None of the Above. I prefer
with This; use This;
with That; use That;
-- Vertical space is precious on my tiny 24 line screen and I
--hate to waste it when all that horizontal space is unused.
regards, sam harbaugh
---------------------
------

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Preferred Style of use clause
@ 1986-08-02 21:40 Jerry Sweet
  0 siblings, 0 replies; 2+ messages in thread
From: Jerry Sweet @ 1986-08-02 21:40 UTC (permalink / 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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~1986-08-02 21:40 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1986-08-02 13:57 Preferred Style of use clause harbaughs
  -- strict thread matches above, loose matches on Subject: below --
1986-08-02 21:40 Jerry Sweet

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