home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #19 / NN_1992_19.iso / spool / comp / lang / fortran / 3339 < prev    next >
Encoding:
Internet Message Format  |  1992-09-01  |  7.0 KB

  1. Path: sparky!uunet!cs.utexas.edu!sun-barr!news2me.ebay.sun.com!exodus.Eng.Sun.COM!appserv.Eng.Sun.COM!appserv!khb
  2. From: khb@chiba.Eng.Sun.COM (Keith Bierman fpgroup)
  3. Newsgroups: comp.lang.fortran
  4. Subject: Re: Help on FORTRAN 90 spec - NAMELISTs
  5. Date: 1 Sep 92 10:19:33
  6. Organization: Sun MegaSystems
  7. Lines: 188
  8. Message-ID: <KHB.92Sep1101933@chiba.Eng.Sun.COM>
  9. References: <1992Aug31.184227.9504@crd.ge.com>
  10. NNTP-Posting-Host: chiba
  11. In-reply-to: foggh@sargon.crd.ge.com's message of 31 Aug 92 18:42:27 GMT
  12.  
  13.  
  14.  
  15. >I am in desparate need of the wording of the proposed FORTRAN 90 spec
  16.  
  17. It isn't a proposal, it is a standard. ISO-IEC 1539:1991.
  18.  
  19.  
  20. 10.9  Namelist formatting
  21.  
  22. The characters in one or more namelist records constitute a sequence
  23. of name-value subsequences, each of which consists of an object name
  24. or a subobject designator followed by an equals and followed by one or
  25. more values and value separators.  The equals may optionally be
  26. preceded or followed by one or more contiguous blanks.  The end of a
  27. record has the same effect as a blank character, unless it is within a
  28. character constant.  Any sequence of two or more consecutive blanks is
  29. treated as a single blank, unless it is within a character constant.
  30.  
  31. The name may be any name in the namelist-group-object-list (5.4).
  32.  
  33. Each value is either a null value (10.9.1.4) or one of the forms:
  34.  
  35.   c
  36.   r * c
  37.   r *
  38.  
  39. where c is a literal constant and r is an unsigned, nonzero, integer
  40. literal constant with no kind type parameter specified.  The r * c
  41. form is equivalent to r successive appearances of the constant c, and
  42. the r * form is equivalent to r successive null values.  Neither of
  43. these forms may contain embedded blanks, except where permitted within
  44. the constant c.
  45.  
  46. A value separator for namelist formatting is the same as for
  47. list-directed formatting (10.8).
  48.  
  49. 10.9.1  Namelist input
  50.  
  51. Input for a namelist input statement consists of:
  52.  
  53.   (1)  Optional blanks,
  54.  
  55.   (2) The character & followed immediately by the namelist-group-name
  56.       specified in the namelist input statement,
  57.  
  58.   (3)  One or more blanks,
  59.  
  60.   (4)  A sequence of zero or more name-value subsequences separated by
  61.        value separators, and
  62.  
  63.   (5)  A slash to terminate the namelist input statement.
  64.  
  65. In each name-value subsequence, the name must be the name of a
  66. namelist group object list item with an optional qualification and the
  67. name with the optional qualification must not be a zero-sized array, a
  68. zero-sized array section, or a zero-length character string.
  69.  
  70. If a processor is capable of representing letters in both upper and
  71. lower case, a group name or object name is without regard to case.
  72. ...
  73.  
  74. 10.9.1.2  Namelist input values
  75.  
  76. The datum c is any input value acceptable to format specifications for
  77. a given type, except for a restriction on the form of input values
  78. corresponding to list items of types logical and integer as specified
  79. in 10.9.1.3.  The form of the input value must be acceptable for the
  80. type of the namelist group object list item.  The number and forms of
  81. the input values that may follow the equals in a name-value
  82. subsequence depend on the shape and type of the object represented by
  83. the name in the input record.  When the name in the input record is
  84. that of a scalar variable of an intrinsic type, the equals must not be
  85. followed by more than one value.  Blanks are never used as zeros, and
  86. embedded blanks are not permitted in constants except within character
  87. constants and complex constants as specified in 10.9.1.3.
  88.  
  89. The name-value subsequences are evaluated serially, in left-to-right
  90. order.  A namelist group object name or subobject designator may
  91. appear in more than one name-value sequence.
  92.  
  93. When the name in the input record represents an array variable or a
  94. variable of derived type, the effect is as if the variable represented
  95. were expanded into a sequence of scalar list items of intrinsic data
  96. types, in the same way that formatted input/output list items are
  97. expanded (9.4.2).  Each input value following the equals must then be
  98. acceptable to format specifications for the intrinsic type of the list
  99. item in the corresponding position in the expanded sequence, except as
  100. noted in 10.9.1.3.  The number of values following the equals must not
  101. exceed the number of list items in the expanded sequence, but may be
  102. less; in the latter case, the effect is as if sufficient null values
  103. had been appended to match any remaining list items in the expanded
  104. sequence.  For example, if the name in the input record is the name of
  105. an integer array of size 100, at most 100 values, each of which is
  106. either a digit string or a null value, may follow the equals; these
  107. values would then be assigned to the elements of the array in array
  108. element order.
  109.  
  110. A slash encountered as a value separator during the execution of a
  111. namelist input statement causes termination of execution of that input
  112. statement after assignment of the previous value.  If there are
  113. additional items in the namelist group object being transferred, the
  114. effect is as if null values had been supplied for them.
  115.  
  116. Successive namelist records are read by namelist input until a slash
  117. is encountered; the remainder of the record is ignored.
  118. ....
  119.  
  120. The standard itself can be procured as posted in days of Yore:
  121.  
  122. From: julian@cernvax.cern.ch (julian bunn)
  123. Newsgroups: comp.lang.fortran
  124. Subject: Fortran 90 Standard
  125. Keywords: standard
  126. Date: 13 Aug 91 06:51:57 GMT
  127. Organization: CERN, Geneva, Switzerland
  128.  
  129.  
  130.  
  131.  
  132.    The new Fortran 90 standard has now been formally published and is
  133. available from the ISO central secretariat or from the national member
  134. bodies. The price is about $120. Some ordering details follow. I can
  135. supply addresses in other countries not mentioned on request (to
  136. METCALF@CERNVM).
  137.  
  138.     The document reference is ISO/IEC 1539 : 1991. There is no ISBN.
  139.  
  140.     ISO
  141.     1, rue de Varembe
  142.     Case postale 56
  143.     1211 Geneva 20
  144.     Switzerland
  145.     Fax: +41 22 734 10 79
  146.  
  147.     ANSI
  148.     1430 Broadway
  149.     New York, NY 10018
  150.  
  151.     BSI
  152.     2 Park Street
  153.     London W1A 2BS
  154.  
  155.     DIN
  156.     Burggrafenstrasse 6
  157.     Postfach 1107
  158.     D-1000 Berlin 30
  159.  
  160.     AFNOR
  161.     Tour Europe
  162.     Cedex 7
  163.     92049 Paris La Defence
  164.  
  165.     SSC
  166.     350 Sparks Street
  167.     Suite 1200
  168.     Ottowa, Ontario, K1P 6N7
  169.  
  170.  
  171.  
  172.                             Mike Metcalf
  173.                             (metcalf@cernvm)
  174.  
  175. and from walt@netcom.com
  176.  
  177. For those of you who don't read comp.lang.fortran,
  178. you might be interested to know that I just called
  179. Global Engineering to see if the sell ISO 1539:1991.
  180. They do; the price is $225.
  181.  
  182. And 
  183.  
  184. You can obtain copies through:
  185.     Global Engineering Documents
  186.     2805 McGaw Ave.
  187.     Irvine, CA. 92714
  188.     (714) 261-1455
  189.     (800) 854-7179
  190.  
  191. The FORTRAN-90 standard will run you about $75 US.
  192. -- 
  193. Richard Gorton               rcg@lpi.liant.com  (508) 626-0006
  194. Liant Software Corp.         Framingham, MA 01760 USA
  195. --
  196. ----------------------------------------------------------------
  197. Keith H. Bierman    keith.bierman@Sun.COM| khb@chiba.Eng.Sun.COM
  198. SunPro 2550 Garcia MTV 12-33             | (415 336 2648) fax 964 0946
  199. Mountain View, CA 94043  <speaking for myself, not Sun*> Copyright 1992
  200.  
  201.