Path: utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!sun-barr!ames!hc!lanl!jlg From: jlg@lanl.gov (Jim Giles) Newsgroups: comp.lang.fortran Subject: Re: Pointer examples and 8x Message-ID: <13971@lanl.gov> Date: 4 Jul 89 22:18:59 GMT References: <673hallidayd@yvax.byu.edu> Organization: Los Alamos National Laboratory Lines: 39 From article <673hallidayd@yvax.byu.edu>, by hallidayd@yvax.byu.edu: > Are we allowed to use (note the double colon) > > TYPE (NODE), POINTER :: FUNCTION ... Since FUNCTION is an attribute of the thing being declared and not part of the thing being declared, the only consistent way to allow double colon on function declarations would be: TYPE (NODE), POINTER, FUNCTION :: ... By the way, I think the commas in the above ought to be optional. After all, in Fortran 77, the following declaration is legal (in fact commas _aren't_ allowed): INTEGER FUNCTION TEST (A... With the double colon this becomes: INTEGER FUNCTION :: TEST (A... I think commas should be optional before the double colon in _all_ declarations. > [...] (A further > note here concerning ambiguities, when the double colon form of declaration > is used let's allow the user defined type to be used without the > TYPE(user_type_name) construct---in fact, I would not mind if user defined > type names are only allowed to be used in the double colon form of > declaration statement.) I completely agree here. I would much prefer to see the following differrences from the proposed syntax: >>> TYPE (NODE), POINTER :: HEAD, NEWNODE NODE POINTER :: HEAD, NEWNODE >>> TYPE (NODE), POINTER :: PTR NODE POINTER :: PTR etc.