Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!ames!oliveb!sun!chiba!khb From: khb%chiba@Sun.COM (Keith Bierman - Sun Tactical Engineering) Newsgroups: comp.lang.fortran Subject: Re: Pointers in Fortran Message-ID: <89276@sun.uucp> Date: 10 Feb 89 09:31:10 GMT References: <1328@dsacg3.UUCP> <7232@june.cs.washington.edu> Sender: news@sun.uucp Reply-To: khb@sun.UUCP (Keith Bierman - Sun Tactical Engineering) Organization: Sun Microsystems, Mountain View Lines: 41 In article <7232@june.cs.washington.edu> david@uw-june.UUCP (David Callahan) writes: >From comp.software-eng, >In article <1328@dsacg3.UUCP> vfm6066@dsacg3.UUCP (John A. Ebersold) writes: >... >I understand that Cray supports some flavor of pointer: integer >variables can be used to define the base of an array. Sort-of C-ish >really but without structures. Anyone have experience with >these? Does the lack of typing on the variables used as pointers >present a problem? Have other vendors provided pointer extensions? Sun and DEC (among others) have both pointers and structures. Use of pointers is _very_ bad for optimization. Personally I am not wild about putting them in....since they are there they will be used...and performance will suffer...then... well you get the picture. > >Fortran 8x has structures, but not pointers. > Wrong. Fortran88 (as ordained by WG5) has them. X3J3 has not produced the ANSI equivalent of the WG5 document (sort of strange since X3J3 wrote the document which WG5 hath ordained...but life can be strange :>) >I have heard it argued that "Fortran programmers need dynamically >allocated arrays, not pointers", but that seems to me to >be only one use for pointers. Does anyone know what some of the >pointer proposals were? Perhaps someone has the text(s) on line. I don't. You are correct that dynamically allocated arrays are only one use (and one which does _not_ require pointers!), however it is the _primary_ use in scientific programs....and as mentioned above pointers cause optimizers real, real, very bad, grief. cheers. khb Keith H. Bierman It's Not My Fault ---- I Voted for Bill & Opus