comp.lang.ada
 help / color / mirror / Atom feed
From: mfeldman@seas.gwu.edu (Michael Feldman)
Subject: Array mappings
Date: 10 Dec 1994 15:55:26 -0500
Date: 1994-12-10T15:55:26-05:00	[thread overview]
Message-ID: <3cd4ju$11h@felix.seas.gwu.edu> (raw)
In-Reply-To: 3c4g1u$uh6@watnews1.watson.ibm.com

In article <3c4g1u$uh6@watnews1.watson.ibm.com>,
Norman H. Cohen <ncohen@watson.ibm.com> wrote:

>The way to use ISUB when passing PL/I arrays to Fortran (or, as it was
>called back then, FORTRAN) is to declare an ordinary array that is filled
>in column-major (i.e., as Fortran expects it).  If, inisde the PL/I
>program, you want to view the data as arranged in row-major order, then
>declare an ISUB that creates a virtual transposed copy of the array.
                                ^^^^^^^
OK, this makes it clear.

>It is the ordinary array that is passed to Fortran, so it is unnecessary
>to create a transposed copy of the array.  (If the array is to be passed
>from one PL/I procedure to another, the ordinary array can be passed and
>the ISUB declaration repeated in the called procedure.)

Aha. This is nice stuff. Perhaps I moved to other things before this
was implemented (or at least well-known) in PL/I.

That this was implemented in PL/I in the mid-70's, or even earlier,
a fact presumably known to the Ada 83 designers, makes me even more 
curious why a similar facility was not provided in Ada 83. pragma Interface 
handles the subprogram interface but there is no corresponding way
to handle the data structure interface.

This is odd - Ada 93 deliberately leaves array mappings (like all
representations) unspecified, so (presumably) as to allow flexibility
in the implementations. Was a pragma equivalent to Convention thought
to be "feature overkill"? 

Finally, even if it was not predefined, such an implementation-defined
pragma would have been legal. Given that there were quite a number of
implementation-defined pragmas in Ada 83 - including such things as
Export, to allow callbacks - why did not this one turn up. I am still
waiting for an implementer to say "we looked at that market carefully
and concluded it was not worth the trouble."  Till then, I stick to
my conjecture that nobody really looked at all that Fortran and
thought about how to sell into that crowd.

It's water over the dam, of course, because of Interfaces.Fortran in
Ada 95. But will we see timely implementations of it (other than GNAT,
which supports it in version 2)?

Mike Feldman



  reply	other threads:[~1994-12-10 20:55 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1994-12-06 13:06 Why don't large companies use Ada? Paige Vinall
1994-12-07 14:15 ` Norman H. Cohen
1994-12-10 20:55   ` Michael Feldman [this message]
1994-12-13 15:01     ` Array mappings Norman H. Cohen
1994-12-16 18:55       ` Michael Feldman
1994-12-17  0:43         ` Keith Thompson
1994-12-17 17:17           ` Reaching traditional engineering, was: " Michael Feldman
1994-12-18  1:34             ` Robert Dewar
1994-12-19  2:11               ` Michael Feldman
1994-12-21 16:17               ` Kevin Weise
1994-12-21 13:29                 ` David Emery
1994-12-22  2:40                   ` Michael Feldman
1994-12-22 10:20                 ` Reaching traditional engineering Introspect Technologies
1994-12-22 20:49                   ` Richard Riehle
1994-12-23  9:09                   ` Peter Hermann
1994-12-27  3:37                 ` Reaching traditional engineering, was: Array mappings Richard G. Hash
1994-12-17 20:42           ` Rolf Ebert
1994-12-19  2:19             ` Michael Feldman
1994-12-19  3:46               ` Robert Dewar
1994-12-19  5:53               ` Mark S. Hathaway
1994-12-19 14:27                 ` Robert Dewar
1994-12-22 17:08               ` Richard G. Hash
1995-01-03  3:26                 ` Fred McCall
1994-12-17 17:41         ` Robert Dewar
1994-12-18  0:03           ` Dik T. Winter
1994-12-19  2:08             ` Michael Feldman
1994-12-19  2:01           ` Michael Feldman
1994-12-19  3:41             ` Robert Dewar
1994-12-20  3:23               ` Michael Feldman
1994-12-20 14:09                 ` Robert Dewar
1994-12-19 19:10             ` Matt Kennel
1994-12-09  2:31 ` Why don't large companies use Ada? Michael Feldman
replies disabled

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