home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #30 / NN_1992_30.iso / spool / comp / lang / fortran / 4724 < prev    next >
Encoding:
Internet Message Format  |  1992-12-15  |  1.6 KB

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