comp.lang.ada
 help / color / mirror / Atom feed
From: Georg Bauhaus <rm.dash-bauhaus@futureapps.de>
Subject: Re: xor
Date: Wed, 28 Mar 2012 14:48:41 +0200
Date: 2012-03-28T14:48:41+02:00	[thread overview]
Message-ID: <4f7308a9$0$7625$9b4e6d93@newsspool1.arcor-online.net> (raw)
In-Reply-To: <Pine.GSO.4.64.1203281140180.3236@kodiak1>

On 28.03.12 14:18, Michael Moeller wrote:

>  While this example compiles without complaints it
> doesn't work with procedures declared in my package. How can I
> make Sequential_IO visible there?

Instantiate Sequential_IO where you need it:
If the instance is needed in several packages,
one solution is to create the instance at library level
(for GNAT, read: in a file that only declares UB_IO).
Then, add a with clause for this instance (UB_IO)
everywhere you need visibility of UB_IO.
(This is what context clauses are about; the other
part of visibility is nesting.)

-->8--
with Package_Defining_UByte;

package UB_IO is new Sequential_IO (Package_Defining_UByte.Ubyte);
--8<--


with UB_IO;
package One is ...

with UB_IO;
package Two is ...



> Its a little strange, though, how dead easy coding concurrency
> on a Sun machine was recently while I'm not able to write out
> some silly bytes using the very same language.

This is not unusual, I think, insofar as virtually every language
requires some effort when I/O is more than "print". Python,
Java, Ada, C, C++, they all have some frowned upon simple I/O procedures,
and then the real thing. The latter takes time getting used to.

(A really good .NET programmer (C#) told me that, now that he
needed to rewrite some software in Java (after a company takeover),
he noticed that he didn't know the first things about formatting
numbers in Java... Of course, he knew about formatting in general
which made learning easier for him.)



  reply	other threads:[~2012-03-28 12:49 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-25 14:28 xor Michael Moeller
2012-03-25 14:01 ` xor Niklas Holsti
2012-03-25 15:16   ` xor Michael Moeller
2012-03-25 19:05     ` xor Dmitry A. Kazakov
2012-03-27 20:31       ` xor Michael Moeller
2012-03-25 19:26     ` xor Niklas Holsti
2012-03-27 20:09       ` xor Michael Moeller
2012-03-27 19:44         ` xor Dmitry A. Kazakov
2012-03-27 21:16           ` xor Michael Moeller
2012-03-27 21:14             ` xor Simon Wright
2012-03-27 22:56               ` xor Michael Moeller
2012-03-27 22:03             ` xor Georg Bauhaus
2012-03-27 23:50               ` xor Michael Moeller
     [not found]                 ` <bbedne9wdofZyu_SnZ2dnUVZ_hydnZ2d@earthlink.com>
2012-03-28 12:18                   ` xor Michael Moeller
2012-03-28 12:48                     ` Georg Bauhaus [this message]
2012-03-28 15:23                       ` xor Michael Moeller
2012-03-28 15:58                         ` xor Niklas Holsti
2012-03-28 17:28                           ` xor Michael Moeller
2012-03-28 23:25                           ` xor Randy Brukardt
2012-03-29  5:17                             ` xor Niklas Holsti
2012-03-29 23:41                               ` xor Randy Brukardt
2012-03-30 21:53                                 ` xor Niklas Holsti
     [not found]                         ` <jtmdnfjWWsUYoO7SnZ2dnUVZ_gSdnZ2d@earthlink.com>
2012-03-28 17:44                           ` xor Michael Moeller
2012-03-28 14:07                     ` xor Dmitry A. Kazakov
2012-03-28 16:16                       ` xor Michael Moeller
2012-03-28 16:08                         ` xor Dmitry A. Kazakov
2012-03-28 17:36                           ` xor Michael Moeller
     [not found]                             ` <tdadna1MV6uj5O7SnZ2dnUVZ_jidnZ2d@earthlink.com>
2012-03-28 21:48                               ` xor Georg Bauhaus
2012-03-29  7:43                               ` xor Dmitry A. Kazakov
2012-03-29  7:49                               ` xor Simon Wright
2012-03-27 21:28           ` xor Georg Bauhaus
2012-03-27 19:50         ` xor Randy Brukardt
2012-03-27 21:44           ` xor Michael Moeller
2012-03-27 22:01             ` xor Georg Bauhaus
2012-03-27 20:13         ` xor Jeffrey Carter
replies disabled

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