dahls%vax.elab.unit.uninett@TOR.NTA.NO (J|rn Yngve Dahl-Stamnes) (04/10/88)
Hello netlanders!
Is there somebody out there who know how to use DATA statement on RECORD
fields in FORTRAN? I can't find any info about this in the yellow binders.
Example:
        INCLUDE         '($FSCNDEF)/NOLIST'
        RECORD  /FSCNDEF/       ITEM(3)
        DATA    ITEM    / 'something' /
I want to assign ITEM(1-3).FSCN$W_ITEM_CODE to ie. FSCN$V_NAME, FSCN$V_TYPE
and 0.
  +-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-+
  ! The University of Trondheim           ! Joern Yngve Dahl-Stamnes  !
  ! The Norwegian Institute of Technology ! System Manager            !
  ! Division of Physical Electronics      !                           !
  ! N 7034 Trondheim, Norway              !                           !
  !---------------------------------------+---------------------------!
  !             dahls%vax.elab.unit.uninett@tor.nta.no                !
  !------->>>>>>>>  "t'nia stnatsnoc ,t'now selbairaV"  <<<<<<<<------!
  +-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-+pstevens@pioneer.arpa (Paul Stevens RCE Sterling) (04/14/88)
In article <91*dahls@vax.elab.unit.uninett> dahls%vax.elab.unit.uninett@TOR.NTA.NO (J|rn Yngve Dahl-Stamnes) writes: > >Is there somebody out there who know how to use DATA statement on RECORD >fields in FORTRAN? I can't find any info about this in the yellow binders. > The answer is that you can only use an data statement on the STRUCTURE declaration and not on the RECORD statement. STRUCTURE /MY_STRUC/ INTEGER*4 A_FIELD /99/ INTEGER*2 ANOTHER /0/ END STRUCTURE RECORD /MY_STRUC/ MY_REC(3) Of course this will put it into all of the fields of MY_REC. However, since record fields may not be atomic, what other choice is there? ----------------------------------------------------------------------- Paul Stevens - NASA Ames Research Center Moffet Field CA Mail Stop 233-10 (415)694-4887 pstevens@ames-pioneer.arpa