comp.lang.ada
 help / color / mirror / Atom feed
From: "Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de>
Subject: Re: question on using `with` without  `use` and visibility of operators such as '*'
Date: Mon, 30 Jul 2012 08:33:09 +0200
Date: 2012-07-30T08:33:09+02:00	[thread overview]
Message-ID: <bveovwgu26yx$.p0ejnzxridmz.dlg@40tude.net> (raw)
In-Reply-To: jv585h$9tj$1@speranza.aioe.org

On Mon, 30 Jul 2012 01:04:34 -0500, Nasser M. Abbasi wrote:

> I prefer to use the long name of a package when I call some of its
> functions.

[...]

> i.e. I really want to just write
> 
>             x * y

Which is in a clear contradiction to what you stated first. "*" is a name
of a function.

> where x,y are variables with types defined in the package, and not write
>
>            x package_foo("*") y

   Package_Foo."*" (X, Y)
 
> This is annoying.

There is a restricted form of use which brings up only operations of a
type:

   use type Package_Foo.Float_Type;
   X, Y : Package_Foo.Float_Type;
begin
   ... X * Y ... -- This is OK now

-- 
Regards,
Dmitry A. Kazakov
http://www.dmitry-kazakov.de



  parent reply	other threads:[~2012-08-07 12:52 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-30  6:04 question on using `with` without `use` and visibility of operators such as '*' Nasser M. Abbasi
2012-07-30  6:30 ` Niklas Holsti
2012-07-30  6:33 ` Dmitry A. Kazakov [this message]
2012-07-30  6:50 ` Ludovic Brenta
replies disabled

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