Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!seismo!gatech!bloom-beacon!think!ames!sdcsvax!nosc!humu!uhccux!bob From: bob@uhccux.UUCP (Bob Cunningham) Newsgroups: comp.lang.fortran,comp.lang.pascal Subject: Re: ALLOCATABLE, ARRAY :: A(:) Message-ID: <672@uhccux.UUCP> Date: Fri, 10-Jul-87 13:59:09 EDT Article-I.D.: uhccux.672 Posted: Fri Jul 10 13:59:09 1987 Date-Received: Sun, 12-Jul-87 12:28:13 EDT References: <1215@batcomputer.tn.cornell.edu> <105@anumb.UUCP> Reply-To: bob@uhccux.UUCP (Bob Cunningham) Organization: U. of Hawaii, Manoa (Honolulu) Lines: 35 Xref: mnetor comp.lang.fortran:160 comp.lang.pascal:199 In article <3164@cit-vax.Caltech.Edu> walton@tybalt.caltech.edu.UUCP (Steve Walton) writes: > > Has anyone seen a Fortran-8x implementation? How is this done? >(Actually, if anyone knows of a Fortran-8x compiler, I'd love to get a >copy.) We have Alliant's Fortran-8x, and version 3.0.14 which is the current version I'm using supports ALLOCATE. It seems to work as advertised in the spec, though I haven't any idea how it's actually implemented. As far as a user is concerned it's just a way to dynamically allocate arrays. As an aside, the big win of Fortran-8x appears to me to be the nifty way that you can use array section specifications and vector/scalar combinations in regular assignment statments. Eliminates a lot of unnecessary little DO loops with otherwise garbage up your code. The new intrinsics (such as MATMUL and DOTPRODUCT) are handy, too. For example, a simplistic version---omitting pivoting---of an LU decomposition of a matrix can be coded very simply, something like this (don't use this code!, I'm typing it in from memory and it probably contains at least one typo): subroutine lu(a,n) dimension a(n,n) do k=2,n-1 a(k:n,k)=a(k:n,k)-matmul(a(k:n,1:k-1),a(1:k-1,k)) a(k,k+1:n)=(a(k,k+1:n)-matmul(a(k,1:k-1),a(1:k-1,k+1:n)))/a(k,k) end do a(n,n)=a(n,n)-dotproduct(a(n,1:n-1),a(1:n-1,n)) return end [I've probably forgotten something important, but I think you can get the flavor...though sometimes I wonder whether it's now possible to write code in Fortran-8x which is as obscure as some APL programs ;-]