From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-0.8 required=5.0 tests=BAYES_00,INVALID_DATE autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,b19fa62fdce575f9 X-Google-Attributes: gid103376,public X-Google-Thread: 1094ba,df9eda71533d664e X-Google-Attributes: gid1094ba,public X-Google-ArrivalTime: 1994-12-06 22:09:48 PST Newsgroups: comp.lang.ada,comp.lang.fortran Path: bga.com!news.sprintlink.net!howland.reston.ans.net!gatech!swrinde!sgiblab!pacbell.com!att-out!nntpa!not-for-mail From: ka@socrates.hr.att.com (Kenneth Almquist) Subject: Re: Why don't large companies use Ada? Message-ID: Sender: news@nntpa.cb.att.com (Netnews Administration) Nntp-Posting-Host: socrates.hr.att.com Organization: AT&T References: <3btldf$aek@network.ucsd.edu> <3c060k$cf7@gnat.cs.nyu.edu> <3c0jj0$1ra@felix.seas.gwu.edu> Date: Wed, 7 Dec 1994 05:46:46 GMT Xref: bga.com comp.lang.ada:8366 comp.lang.fortran:6950 Date: 1994-12-07T05:46:46+00:00 List-Id: Michael Feldman wrote: > But unless I mis-read the post from the IBM chap the other day, > ISUB does more than logically swap the indices, it actually > transposes the array. ISUB lets you declare an array which is really a veiw of another array. For example: DCL A_FORTRAN(5, 7); DCL A(7, 5) DEFINED A_FORTRAN(2SUB, 1SUB); declares the array A_FORTRAN, and then overlays the array A on top of it with the subscripts in the opposite order. This means that A(3, 2) refers to the same element as A_FORTRAN(2, 3). Now you can write: DCL FSUB ENTRY((5, 7) FLOAT) OPTIONS(FORTRAN NOMAP); FSUB(A_FORTRAN); The FORTRAN option tells the PL/1 compiler that FSUB is a FORTRAN routine (probably unnecessary, but a good precaution), and the NOMAP option tells the compiler to pass the arguments directly even though the routine is in FORTRAN. Without the NOMAP option, the PL/1 compiler would create a copy of the array with the subscripts swapped. > Has PL/1 supported ISUB all along? I do not remember it from my > PL/1 days 20 or so years ago. The information in this posting comes from a 1974 manual. Kenneth Almquist