From: "Tarjei Tj�stheim Jensen" <tarjei.jensen@kvaerner.no>
Subject: Re: Question for the folks who designed Ada95
Date: 1999/04/27
Date: 1999-04-27T00:00:00+00:00 [thread overview]
Message-ID: <7g4ae3$hjh2@ftp.kvaerner.com> (raw)
In-Reply-To: 7g3b5g$p92$1@nnrp1.dejanews.com
Robert Dewar wrote :
>What we do in GNAT to address this problem is to make the
>shift operators intrinsics. Here is a typical declaration
>from the Interfaces spec:
>
> pragma Import (Intrinsic, Shift_Left);
>
>The nice thing about this approach is that indeed you
>*can* apply this intrinsic to a user defined type. For
>example you can put the following in your code.
>
>
> type My_Modular is mod 2**Integer'Size;
> function Shift_Left
> (Value : My_Modular;
> Amount : Natural)
> return My_Modular;
> pragma Import (Intrinsic, Shift_Left);
I think the person who asked the question whould have preferred something that
was inline instead of a function call. At least that would _look_ efficient.
>and this will work fine. Of course this is not guaranteed
>to be portable (perhaps the ARG should look at this one,
>since it is a perfectly legitimate implementation
>decision).
While you are at it, why not get us [ and ] for arrays (in addtion to, not
instead of parenthesises). I really want to write a[4] := 3 instead of a(4) :=
3.
I know that when Ada 83 was defined one could not rely on [ and ] being
available (Pascal used (. and .) instead of [ and ] if my memory serves me
right). However these days I see no reason not to comply with the common use of
square brackets with arrays.
Arrays as functions? Since when could you assign to a function??
Greetings,
next prev parent reply other threads:[~1999-04-27 0:00 UTC|newest]
Thread overview: 88+ messages / expand[flat|nested] mbox.gz Atom feed top
1999-04-26 0:00 Question for the folks who designed Ada95 Corey Ashford
1999-04-27 0:00 ` Matthew Heaney
1999-04-27 0:00 ` Corey Ashford
1999-04-28 0:00 ` Marin David Condic
1999-04-28 0:00 ` Robert A Duff
1999-04-28 0:00 ` Keith Thompson
1999-04-29 0:00 ` Robert A Duff
1999-04-27 0:00 ` Matthew Heaney
1999-04-27 0:00 ` Robert Dewar
1999-04-27 0:00 ` Tarjei Tj�stheim Jensen [this message]
1999-04-27 0:00 ` Larry Kilgallen
1999-04-27 0:00 ` bill
1999-04-27 0:00 ` Robert Dewar
1999-04-27 0:00 ` Al Christians
1999-04-27 0:00 ` Larry Kilgallen
1999-04-27 0:00 ` Al Christians
1999-04-28 0:00 ` Robert A Duff
1999-04-28 0:00 ` Robert Dewar
1999-04-29 0:00 ` Matthew Heaney
1999-04-29 0:00 ` Jean-Pierre Rosen
1999-04-29 0:00 ` Robert Dewar
1999-04-27 0:00 ` dennison
1999-04-27 0:00 ` Robert Dewar
1999-04-29 0:00 ` Robert A Duff
1999-04-27 0:00 ` Robert Dewar
1999-04-28 0:00 ` Corey Ashford
1999-04-28 0:00 ` Robert Dewar
1999-04-28 0:00 ` Robert A Duff
1999-04-28 0:00 ` Robert Dewar
1999-04-29 0:00 ` Robert A Duff
1999-04-29 0:00 ` Corey Ashford
1999-04-29 0:00 ` Corey Ashford
1999-04-29 0:00 ` Robert Dewar
1999-04-29 0:00 ` Fraser Wilson
1999-04-29 0:00 ` Mark A Biggar
1999-04-30 0:00 ` Tucker Taft
1999-04-29 0:00 ` Tucker Taft
1999-04-29 0:00 ` Marin David Condic
1999-04-30 0:00 ` David Brown
1999-04-29 0:00 ` Geert Bosch
1999-04-27 0:00 ` David Starner
1999-04-27 0:00 ` Robert Dewar
1999-04-27 0:00 ` David Starner
1999-04-28 0:00 ` Robert Dewar
1999-04-28 0:00 ` Samuel Mize
1999-04-28 0:00 ` Tarjei Tj�stheim Jensen
1999-04-28 0:00 ` Larry Kilgallen
1999-04-28 0:00 ` Robert Dewar
1999-04-28 0:00 ` Robert A Duff
1999-04-29 0:00 ` Tarjei Tj�stheim Jensen
1999-04-29 0:00 ` Bill Ghrist
1999-04-28 0:00 ` dennison
1999-04-28 0:00 ` Robert Dewar
1999-04-28 0:00 ` Robert A Duff
1999-04-28 0:00 ` Brian Hanson
1999-04-28 0:00 ` bill
1999-04-29 0:00 ` Robert Dewar
1999-04-28 0:00 ` Pat Rogers
1999-04-29 0:00 ` Robert Dewar
1999-04-29 0:00 ` dennison
1999-04-29 0:00 ` Pat Rogers
1999-04-29 0:00 ` Robert S. White
1999-04-29 0:00 ` Robert Dewar
1999-04-30 0:00 ` Robert S. White
1999-04-29 0:00 ` Robert Dewar
1999-04-30 0:00 ` Robert S. White
1999-04-30 0:00 ` dennison
1999-04-30 0:00 ` Robert Dewar
1999-04-28 0:00 ` Robert A Duff
1999-04-29 0:00 ` Question for the folks who designed Ad David Kristola
1999-04-29 0:00 ` Paul Duquennoy
1999-04-29 0:00 ` Question for the folks who designed Ada95 Aidan Skinner
1999-04-30 0:00 ` Matthew Heaney
1999-04-27 0:00 ` Corey Ashford
1999-04-27 0:00 ` Samuel Mize
1999-04-27 0:00 ` Samuel Mize
1999-04-27 0:00 ` Robert Dewar
1999-04-28 0:00 ` Samuel Mize
1999-04-28 0:00 ` Samuel Mize
1999-04-28 0:00 ` Corey Ashford
1999-04-28 0:00 ` Robert Dewar
1999-04-29 0:00 ` Corey Ashford
1999-04-29 0:00 ` Robert Dewar
1999-04-29 0:00 ` Fraser Wilson
1999-04-29 0:00 ` Marin David Condic
1999-04-29 0:00 ` Robert Dewar
1999-04-28 0:00 ` Corey Ashford
1999-04-28 0:00 ` Corey Ashford
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox