🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.fortran
Article #4586

Re: Structure and Data Statement Usage

#4586
From: Walt Brainerd
Date: Fri, 08 Jan 1993 23:42
41 lines
1522 bytes
In article <7876@dove.nist.gov>, fred@poly2.nist.gov (Frederick R. Phelan Jr.) writes:
> Heres a small code prototype of my problem:
> 
>       program test_35
> 
>       structure /geom/
>         integer ngprops
>       end structure
>       record /geom/ g1,g2
> 
> c     uncomment these for compiler havoc
> c      data g1.ngprops /3/
> c      data g2.ngprops /5/
> 
It is unfortunate that a person at  N  I  !!!S!!!  T  is not using
a STANDARD language 8^).

In standard Fortran 90, it goes like this:

program test_35

type geom
  integer ngprops
end type geom

type (geom) g1, g2

data g1%ngprops /3/
data g2%ngprops /5/

print*, g1, g2
end

I believe this will run on SGI machines using the NAG compiler,
an execellent tool for code development and learning until SGI
gets their own compiler.
-- 
Walt Brainerd                walt@netcom.com
Unicomp, Inc.                +1-415-949-4052
235 Mt. Hamilton Ave.        +1-415-949-4058 (fax)
Los Altos, CA 94022 USA      "F90--Fortran for the '90s"
Technical Details
Message-ID: <1993Jan8.234201.13599@netcom.com>
Path: arc1-ca.pugleaf.net!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
References: <7876@dove.nist.gov>

Show Full Headers
Complete Article Headers
Newsgroups: comp.lang.fortran
Path: arc1-ca.pugleaf.net!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
From: walt@netcom.com (Walt Brainerd)
Subject: Re: Structure and Data Statement Usage
Message-ID: <1993Jan8.234201.13599@netcom.com>
Organization: Netcom - Online Communication Services  (408 241-9760 guest) 
References: <7876@dove.nist.gov>
Date: Fri, 8 Jan 1993 23:42:01 GMT
Lines: 41