From: "John B. Matthews" <nospam@nospam.invalid>
Subject: Re: prefix of dereference must be a name?
Date: Mon, 03 Aug 2009 13:46:23 -0400
Date: 2009-08-03T13:46:23-04:00 [thread overview]
Message-ID: <nospam-D1D694.13462303082009@news.aioe.org> (raw)
In-Reply-To: dfef89b8-7821-4852-bff7-9dac1bafa2a8@t11g2000prh.googlegroups.com
In article
<dfef89b8-7821-4852-bff7-9dac1bafa2a8@t11g2000prh.googlegroups.com>,
Adam Beneschan <adam@irvine.com> wrote:
> On Jul 30, 12:35 pm, "John B. Matthews" <nos...@nospam.invalid> wrote:
>
> > Interesting. The compiler was happy with a function call:
> >
> > A.all := "+"(C, B).all;
> >
> > but a use_type_clause didn't seem to help.
>
> Right, because (C + B).all just doesn't fit into the syntax. USE TYPE
> makes certain functions visible that wouldn't otherwise be directly
> visible, but it doesn't change the syntax rules. (If "+" weren't
> visible at all, then you'd get an error with
>
> "+"(C,B).all
>
> but it wouldn't be a syntax error; the error would be that the
> compiler didn't know what "+" meant. This could be hypothetically
> fixed with something like
>
> Some_Package."+"(C, B).all
>
> USE TYPE can also fix that problem by making "+" directly visible,
> i.e. visible without needing a package name. But it still can't make
> illegal syntax illegal.)
Ah, that makes sense. Thanks. The problem wasn't visibility; it was
legality. Yannick's reference to the definition of names was
dispositive:
<http://www.adaic.com/standards/05rm/html/RM-4-1.html>
--
John B. Matthews
trashgod at gmail dot com
<http://sites.google.com/site/drjohnbmatthews>
next prev parent reply other threads:[~2009-08-03 17:46 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-07-30 7:09 prefix of dereference must be a name? Stephen Leake
2009-07-30 17:36 ` Yannick Duchêne Hibou57
2009-07-31 12:04 ` Stephen Leake
2009-07-31 12:23 ` Dmitry A. Kazakov
2009-07-31 21:49 ` Robert A Duff
2009-07-30 19:35 ` John B. Matthews
2009-08-03 14:44 ` Adam Beneschan
2009-08-03 17:46 ` John B. Matthews [this message]
2009-08-04 1:45 ` Adam Beneschan
2009-08-04 3:37 ` Yannick Duchêne Hibou57
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox