home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!elroy.jpl.nasa.gov!nntp-server.caltech.edu!sampson!shepard
- From: shepard@sampson.ccsf.caltech.edu (Ron Shepard)
- Newsgroups: comp.lang.fortran
- Subject: Re: SUMMARY: CHARACTER FUNCTION as dummy argument
- Date: 15 Dec 1992 18:44:33 GMT
- Organization: California Institute of Technology, Pasadena
- Lines: 36
- Message-ID: <1gl92hINNalq@gap.caltech.edu>
- References: <BURLEY.92Dec15044825@apple-gunkies.gnu.ai.mit.edu>
- NNTP-Posting-Host: sampson.ccsf.caltech.edu
-
-
- > program dumb
- > character*30 cvar
- > character*(*) cfun
- > external cfun
- > cvar='xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'
- > call sub1( cvar, cfun )
- > write(*,*) 'cvar=', cvar
- > call sub2( cvar, cfun )
- > write(*,*) 'cvar=', cvar
- > stop
- > end
- > [Lines Deleted]
-
- The above declaration (and the code; see previous entries in this
- thread) works alright on a Sun and on an Alliant. It DOESN'T work
- on a Cray and on a Stardent Titan (and apparently on VAX/VMS
- according to one poster).
-
- Two Questions:
-
- 1) Is the above legal f77? (Please cite the standard if possible)
-
- My previous posting that it could be legal was based on page 8-6
- lines 40-45 which states (somewhat obscurely):
- "An entity declared in a CHARACTER statement must have a length
- specification that is an integer constant expression, unless that
- ^^^^^^^^^^^
- entity is an external function, a dummy argument of an external
- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
- procedure, or a character constant that has a symbolic name."
-
- 2) If it is standard, then on which machines does it not work?
-
- -Ron Shepard
- shepard@tcg.anl.gov
-