home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #1 / NN_1993_1.iso / spool / comp / lang / fortran / 4951 < prev    next >
Encoding:
Text File  |  1993-01-08  |  1.4 KB  |  52 lines

  1. Newsgroups: comp.lang.fortran
  2. Path: sparky!uunet!cis.ohio-state.edu!zaphod.mps.ohio-state.edu!moe.ksu.ksu.edu!ux1.cso.uiuc.edu!news.cs.indiana.edu!umn.edu!csus.edu!netcom.com!walt
  3. From: walt@netcom.com (Walt Brainerd)
  4. Subject: Re: Structure and Data Statement Usage
  5. Message-ID: <1993Jan8.234201.13599@netcom.com>
  6. Organization: Netcom - Online Communication Services  (408 241-9760 guest) 
  7. References: <7876@dove.nist.gov>
  8. Date: Fri, 8 Jan 1993 23:42:01 GMT
  9. Lines: 41
  10.  
  11. In article <7876@dove.nist.gov>, fred@poly2.nist.gov (Frederick R. Phelan Jr.) writes:
  12. > Heres a small code prototype of my problem:
  13. >       program test_35
  14. >       structure /geom/
  15. >         integer ngprops
  16. >       end structure
  17. >       record /geom/ g1,g2
  18. > c     uncomment these for compiler havoc
  19. > c      data g1.ngprops /3/
  20. > c      data g2.ngprops /5/
  21. It is unfortunate that a person at  N  I  !!!S!!!  T  is not using
  22. a STANDARD language 8^).
  23.  
  24. In standard Fortran 90, it goes like this:
  25.  
  26. program test_35
  27.  
  28. type geom
  29.   integer ngprops
  30. end type geom
  31.  
  32. type (geom) g1, g2
  33.  
  34. data g1%ngprops /3/
  35. data g2%ngprops /5/
  36.  
  37. print*, g1, g2
  38. end
  39.  
  40. I believe this will run on SGI machines using the NAG compiler,
  41. an execellent tool for code development and learning until SGI
  42. gets their own compiler.
  43. -- 
  44. Walt Brainerd                walt@netcom.com
  45. Unicomp, Inc.                +1-415-949-4052
  46. 235 Mt. Hamilton Ave.        +1-415-949-4058 (fax)
  47. Los Altos, CA 94022 USA      "F90--Fortran for the '90s"
  48.