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

  1. From: djm@hpfcso.FC.HP.COM (Dan Magenheimer)
  2. Date: Tue, 25 Aug 1992 15:53:51 GMT
  3. Subject: Re: CALLING UNIX (PORTABLY) FROM FORTRAN
  4. Message-ID: <9080029@hpfcso.FC.HP.COM>
  5. Organization: Hewlett-Packard, Fort Collins, CO, USA
  6. Path: sparky!uunet!usc!sdd.hp.com!hpscdc!hplextra!hpfcso!djm
  7. Newsgroups: comp.lang.fortran
  8. Lines: 668
  9.  
  10. Here's the responses I received from the message I posted 7/28/92 titled
  11. "CALLING UNIX (PORTABLY) FROM FORTRAN".  Thanks to all who responded!
  12. I've also included some further discussion following the responses and the
  13. original message follows that.
  14.  
  15. If you missed the orignal posting and would still like to respond, I am
  16. still collecting responses!
  17.  
  18.  
  19.                 Dan Magenheimer
  20.                 IEEE 1003.9 (ex-)Technical Editor
  21.  
  22. ##############################################################################
  23. >From idacrd!ccr-p.ida.org!desj@uunet.UU.NET Wed Jul 29 08:10 MDT 1992
  24. Date: Wed, 29 Jul 92 10:07:40 EDT
  25. From: desj@ccr-p.ida.org (David desJardins)
  26. To: djm@hpfcla.fc.hp.com
  27. Subject: Re: CALLING UNIX (PORTABLY) FROM FORTRAN
  28. Organization: IDA Center for Communications Research, Princeton
  29.  
  30. In article <9080025@hpfcso.FC.HP.COM> you write:
  31. >Still, we're proud that we were able to complete the standards process
  32. >and would like to find out if and how widely it would be used.  So,
  33. >please reply to this message (email or notes/news) with:
  34. >
  35. >   1) Will you use it if its available? (Optional: How? Why? When?)
  36. >   2) Will you be encouraging your system/Fortran vendor to provide it?
  37.  
  38. Yes, I certainly intend to use it, and to encourage the vendors on
  39. which I use Fortran (primarily Cray Research, at present) to support
  40. it.  The most significant reason I want to use it is one that you
  41. mention.  Fortran I/O (including Fortran 90) is completely inadequate.
  42. Currently all of my I/O (and all of that of everyone that I know) is
  43. sequential and non-record-based, but support for that is rather poor
  44. and non-standard.  (For example, I don't know any good way to read
  45. binary data from stdin.)  I definitely desire a more portable and
  46. generic method for non-record-based I/O.
  47.  
  48. >Caveats:  As you will see if you look at the standard (and as may be pointed
  49. >out by some who opposed the standard), the standard contains some
  50. >compromises that may be considered less than aesthetic.  This tends to be
  51. >true of any standard, but the reasoning for each decision is carefully
  52. >described in the Rationale appendix to the standard. Also, some areas
  53. >that might have proved useful to standardize were left out to increase
  54. >consensus.  These may be standardized by future standards committees.
  55.  
  56. Of course, the strength of my support depends on these details of the
  57. standard, which I haven't had a chance to review.
  58.  
  59.                                         David desJardins
  60.  
  61. ##############################################################################
  62. [See discussion section for further information on this response. -ed]
  63. >From Robert.Corbett@Eng.Sun.COM Mon Aug  3 22:26 MDT 1992
  64. From: Robert.Corbett@Eng.Sun.COM (Robert Corbett)
  65. To: djm@hpfcso.FC.HP.COM
  66. Subject: Re: CALLING UNIX (PORTABLY) FROM FORTRAN
  67. Organization: Sun Microsystems, Mt. View, Ca.
  68.  
  69. Is draft 11 of P1003.9 dated August 23, 1991 reasonably close to
  70. the final standard?
  71.  
  72.                     Yours truly,
  73.                     Robert Corbett
  74. ##############################################################################
  75. >From howard@ee.utah.edu Wed Jul 29 13:57 MDT 1992
  76. From: Walt Howard <howard@ee.utah.edu>
  77. To: djm@hpfcla.fc.hp.com
  78. Subject: Re: Fortran bindings for Posix calls
  79.  
  80. Yes, we will use them when they become available.  We will certainly
  81. encourage our vendor to supply them.
  82.  
  83. FYI, our vendor is HP, and we do use the hooks provided in the present
  84. HP F77 compiler to make use of HP-UX routines.
  85.  
  86. My congratulations on getting a standard out the door.
  87.  
  88. >>Walt
  89.  
  90. ##############################################################################
  91. [See discussion section for further information on this response. -ed]
  92. >From maine@altair.dfrf.nasa.gov Wed Jul 29 20:58 MDT 1992
  93. From: maine@altair.dfrf.nasa.gov (Richard Maine)
  94. To: djm@hpfcla.fc.hp.com (Dan Magenheimer)
  95. Subject: CALLING UNIX (PORTABLY) FROM FORTRAN
  96.  
  97. On Tue, 28 Jul 1992 18:13:00 GMT, djm@hpfcso.FC.HP.COM (Dan Magenheimer) said:
  98.  
  99. Dan> WANT TO CALL UNIX PORTABLY FROM FORTRAN?  Read this:
  100.  
  101.         [...description of POSIX 1003.9...]
  102. Dan>    1) Will you use it if its available? (Optional: How? Why? When?)
  103. Dan>    2) Will you be encouraging your system/Fortran vendor to provide it?
  104.  
  105. The answer to both quetions for me is "no."  Reasons:
  106.  
  107. 1. All my Fortran programming (which is most of my programming) is now
  108.    in Fortran 90 rather than Fortran 77.  I've been using f90 since
  109.    October of last year, and I don't anticipate using f77 on any new
  110.    projects.  I am encouraging all of the other users at my site to
  111.    convert to f90 and I am encouraging vendors to support it.
  112.  
  113.    I consider the style of 1003.9 to be very foreign to even f77; many
  114.    of the concepts seem simply lifted from C/unix with little integration
  115.    into the style of f77 programming.  Yes, it is legal f77, but very
  116.    cryptic and unnatural in style.  As out of place as it seems in f77,
  117.    it seems even farther removed from reasonable f90 style.  There are
  118.    obscure constructs to accomplish what can be done simply, naturally,
  119.    and portably in f90.
  120.  
  121.    For one of many, many examples: suppose I want to open a file for
  122.    readonly access (to facilitate sharing, lessen the likelihood of
  123.    accidentally corrupting the file, etc).  There have been widely
  124.    used f77 extensions for this for many years.  F90 standardizes this
  125.    with the action="read" specifier in the open.  As I recall 1003.9,
  126.    it would require me to completely abandon standard Fortran i/o on
  127.    the file and rewrite the access to that file in terms of the 1003.9
  128.    calls.  This is not what I call integration into reasonable
  129.    Fortran style.
  130.  
  131.    Yes, I heard/read some of the rationale for making it an f77
  132.    binding (and an obscure one at that); no I don't agree with it.
  133.  
  134. 2. Portability.  My programs must run on many systems.  This includes
  135.    both unix and non-unix systems.  At the moment, I don't know of
  136.    any vendors offering 1003.9 even on unix systems.  (There may well
  137.    be some, but presumably it isn't a significant majority or I'd have
  138.    heard more about it).  Even if all the unix vendors universally
  139.    decided to support 1003.9, by the time that support was widely
  140.    available, the limittations of the f77 style of the interface would
  141.    seem more out of place than they do now.
  142.  
  143.    And, of course, all this has no hope of applying to non-unix systems.
  144.    The 1003.9 interface makes no attempt to abstract the concepts
  145.    involved, but is just a straight translation of Unix system calls.
  146.    I can't even think what some of the concepts would mean in a non-unix
  147.    environment.
  148.  
  149.    If I used this "standard" I would actually sacrifice portability in
  150.    some ways.  I'd have to change perfectly standard, portable f90
  151.    constructs to calls available only on unix systems (and perhaps
  152.    not on all of them).
  153.  
  154. 3. Yes, there are things I need/want to do that aren't within the
  155.    confines of standard, portable, f90.  My approach will continue to
  156.    be, as it has been in the past, to isolate such system-dependent
  157.    code to a small set of routines that I port to the various relevant
  158.    systems.  I abstract and simplify the required interface enough that
  159.    it should be relatively easy to write the routines for the various
  160.    systems.
  161.  
  162.    The 1003.9 routines are far too obscure and far too tied to unix to
  163.    be adopted as my system-dependent interface.  It is not a small set
  164.    of routines and it is not abstracted at all.  The extent that I
  165.    might make use of 1003.9 is that one of the system-dependent
  166.    versions of my routines might someday call some of the 1003.9
  167.    routines.  In this, the 1003.9 stuff would be no more than one
  168.    other implementation of my system-dependent routines.
  169.  
  170. --
  171. Richard Maine
  172. maine@altair.dfrf.nasa.gov
  173.  
  174.  
  175. ##############################################################################
  176. >From aix3!sbh@netcom.com Thu Jul 30 08:02 MDT 1992
  177. From: aix3!sbh@netcom.com (Stewart Holt)
  178. To: netcomsv!djm@hpfcso.FC.HP.COM (Dan Magenheimer)
  179. Subject: Re: CALLING UNIX (PORTABLY) FROM FORTRAN
  180. Organization: Energy Management Associates
  181.  
  182. In article <9080025@hpfcso.FC.HP.COM>, you wrote:
  183. > As an ex-member of the committee, I'd like to poll the user community
  184. > to determine 1) whether you will use it, and 2) whether you will be
  185. > encouraging your system and/or Fortran vendors to provide it.
  186. Yes, we are very interrested in this. I personally support a "portability
  187. library" for fortran which is used on about 12 different platforms.  As you
  188. mentioned much of what you describe is exists in various forms. I am the
  189. one who deals with those forms!
  190.  
  191. I would like to see this standard asap. Wish IEEE would post text on net. I
  192. had rather scan with editor than use an index of a document. I will
  193. encourage our vendors to support this.  I have been waiting for this piece
  194. of Posix since the various standards were defined. Thanks for your
  195. interest.
  196.  
  197. ##############################################################################
  198. >From metaware!metaware.com!miker@netcom.com Thu Jul 30 09:55 MDT 1992
  199. From: miker@metaware.com (Mike Ross)
  200. Subject: Re: CALLING UNIX (PORTABLY) FROM FORTRAN
  201. Newsgroups: comp.lang.fortran
  202. Organization: Metaware Incorporated, Santa Cruz, CA
  203.  
  204.  I reserve judgement until I see a full copy of
  205.  the standard. Assuming it is not too unreasonable,
  206.  I will consider implementing it in our FORTRAN.
  207.  I can't say when-- that would be classified :-).
  208.          Mike
  209.  
  210.  
  211. ##############################################################################
  212. [See discussion section for further information on this response. -ed]
  213. >From mckenney@GAUSS.CIMS.NYU.EDU Wed Jul 29 08:24 MDT 1992
  214. From: mckenney@cs.nyu.edu (Alan M. McKenney)
  215. To: djm@hpfcso.FC.HP.COM
  216. Subject: Re: CALLING UNIX (PORTABLY) FROM FORTRAN
  217. Organization: Courant Institute, NYU, NY, NY, USA
  218.  
  219.     Could you perhaps tell us how to get a copy of the IEEE
  220. 1003.9 standard?
  221.  
  222.  
  223. -- 
  224. Alan McKenney        E-mail:  mckenney@cims.nyu.edu         (INTERNET)
  225. Courant Institute,NYU,USA     ...!cmcl2!cims.nyu.edu!mckenney   (UUCP)
  226.  
  227. ##############################################################################
  228. ##############################################################################
  229.         ADDITIONAL DISCUSSION
  230. ##############################################################################
  231. >From djm Tue Aug  4 15:26:26 1992
  232. To: Robert.Corbett@Eng.Sun.COM
  233. Subject: Re: CALLING UNIX (PORTABLY) FROM FORTRAN
  234.  
  235. >From Robert.Corbett@Eng.Sun.COM Mon Aug  3 22:26 MDT 1992
  236. >To: djm@hpfcso.FC.HP.COM
  237. >Subject: Re: CALLING UNIX (PORTABLY) FROM FORTRAN
  238. >Newsgroups: comp.lang.fortran
  239. >
  240. >Is draft 11 of P1003.9 dated August 23, 1991 reasonably close to
  241. >the final standard?
  242. >
  243. >                    Yours truly,
  244. >                    Robert Corbett
  245.  
  246. There were a few semantic clarifications after draft 11, but none of the
  247. syntax/interfaces changed.  The final standard should be available for
  248. purchase from IEEE in September.
  249.  
  250.             Thanks,
  251.             Dan Magenheimer
  252.  
  253.  
  254. ##############################################################################
  255. >From djm Wed Jul 29 14:01:11 1992
  256. To: mckenney@GAUSS.CIMS.NYU.EDU
  257. Subject: Re: CALLING UNIX (PORTABLY) FROM FORTRAN
  258. Status: R
  259.  
  260. >From mckenney@GAUSS.CIMS.NYU.EDU Wed Jul 29 08:24 MDT 1992
  261. >From: mckenney@cs.nyu.edu (Alan M. McKenney)
  262. >Subject: Re: CALLING UNIX (PORTABLY) FROM FORTRAN
  263. >Newsgroups: comp.lang.fortran
  264. >
  265. >    Could you perhaps tell us how to get a copy of the IEEE
  266. >1003.9 standard?
  267. >
  268. >Alan McKenney        E-mail:  mckenney@cims.nyu.edu         (INTERNET)
  269. >Courant Institute,NYU,USA     ...!cmcl2!cims.nyu.edu!mckenney   (UUCP)
  270.  
  271. Camera ready copy is in IEEE's hands.  There will undoubtedly be
  272. a final formatting tweak or two, then it will be off to the publishers.
  273. I'd guess 4-6 weeks before it will be available for ordering from
  274. IEEE. I'll post the ordering details at that time.
  275.  
  276. Does this mean you are interested?  Or did the caveats scare you?
  277.  
  278.                 Dan Magenheimer
  279.  
  280. ##############################################################################
  281. >From djm Thu Jul 30 09:59:44 1992
  282. To: maine@altair.dfrf.nasa.gov
  283. Subject: Re:  CALLING UNIX (PORTABLY) FROM FORTRAN
  284. Status: R
  285.  
  286. >From maine@altair.dfrf.nasa.gov Wed Jul 29 20:58 MDT 1992
  287. >Subject: CALLING UNIX (PORTABLY) FROM FORTRAN
  288. >
  289. >On Tue, 28 Jul 1992 18:13:00 GMT, djm@hpfcso.FC.HP.COM (Dan Magenheimer) said:
  290. >
  291. >Dan> WANT TO CALL UNIX PORTABLY FROM FORTRAN?  Read this:
  292. >
  293. >        [...description of POSIX 1003.9...]
  294. >Dan>    1) Will you use it if its available? (Optional: How? Why? When?)
  295. >Dan>    2) Will you be encouraging your system/Fortran vendor to provide it?
  296.  
  297. Richard --
  298.  
  299. Thanks much for your thoughtful response.
  300.  
  301. >The answer to both quetions for me is "no."  Reasons:
  302. >
  303. >1. All my Fortran programming (which is most of my programming) is now
  304. >   in Fortran 90 rather than Fortran 77.  I've been using f90 since
  305. >   October of last year, and I don't anticipate using f77 on any new
  306. >   projects.  I am encouraging all of the other users at my site to
  307. >   convert to f90 and I am encouraging vendors to support it.
  308.  
  309. I too am fully supportive of Fortran 90 (and managed some of the HP early
  310. investigations into it).  Still, given the large number of programmers
  311. using F66 well into the eighties, we were certain that F77 bindings
  312. would be useful for some time to come.
  313.  
  314. As you're aware, F77 is a subset (well, close enough) of F90 so 1003.9
  315. works for F90 as well.
  316.  
  317. >   I consider the style of 1003.9 to be very foreign to even f77; many
  318. >   of the concepts seem simply lifted from C/unix with little integration
  319. >   into the style of f77 programming.  Yes, it is legal f77, but very
  320. >   cryptic and unnatural in style.  As out of place as it seems in f77,
  321. >   it seems even farther removed from reasonable f90 style.  There are
  322. >   obscure constructs to accomplish what can be done simply, naturally,
  323. >   and portably in f90.
  324.  
  325. That's why we didn't call it an F90 binding as well, even though it could
  326. be.  Michael Hannah is chairing a committee to do a F90 binding.
  327.  
  328. I'd still be interested in your answers to the original questions, as
  329. they apply to a "future F90 binding"?  Would you use it?  Would you
  330. encourage vendors to provide it?
  331.  
  332. As for "C/unix-ness", we had a very difficult task bridging the cultural
  333. gap between Fortran and C/Unix.  We thought that, if anything, we leaned
  334. more in the direction of Fortran than C/Unix.  Much of the cryptic/unnatural
  335. style was imposed by the constraint of sticking to the F77 standard
  336. and common Fortran coding conventions (e.g. subroutines).
  337.  
  338. >   For one of many, many examples: suppose I want to open a file for
  339. >   readonly access (to facilitate sharing, lessen the likelihood of
  340. >   accidentally corrupting the file, etc).  There have been widely
  341. >   used f77 extensions for this for many years.  F90 standardizes this
  342. >   with the action="read" specifier in the open.  As I recall 1003.9,
  343. >   it would require me to completely abandon standard Fortran i/o on
  344. >   the file and rewrite the access to that file in terms of the 1003.9
  345. >   calls.  This is not what I call integration into reasonable
  346. >   Fortran style.
  347.  
  348. Yes, another constraint we lived with was not specifying language extensions
  349. though there were many we would have liked to do.  This limited the style
  350. integration available to us.
  351.  
  352. >   Yes, I heard/read some of the rationale for making it an f77
  353. >   binding (and an obscure one at that); no I don't agree with it.
  354.  
  355. Obscure?
  356.  
  357. >2. Portability.  My programs must run on many systems.  This includes
  358. >   both unix and non-unix systems.  At the moment, I don't know of
  359. >   any vendors offering 1003.9 even on unix systems.  (There may well
  360. >   be some, but presumably it isn't a significant majority or I'd have
  361. >   heard more about it).  Even if all the unix vendors universally
  362. >   decided to support 1003.9, by the time that support was widely
  363. >   available, the limittations of the f77 style of the interface would
  364. >   seem more out of place than they do now.
  365.  
  366. For forward looking users such as yourself, this is probably true.
  367.  
  368. No, no vendors are providing 1003.9 yet as far as I know.  Several vendors
  369. are providing similar mechanisms which were used as bases for the standard.
  370.  
  371. >   And, of course, all this has no hope of applying to non-unix systems.
  372. >   The 1003.9 interface makes no attempt to abstract the concepts
  373. >   involved, but is just a straight translation of Unix system calls.
  374. >   I can't even think what some of the concepts would mean in a non-unix
  375. >   environment.
  376.  
  377. True, but an increasing number of vendors are providing 1003.1 compliance
  378. even on their proprietary systems (e.g. "OpenVMS", MPE/ix, Windows NT)
  379. as it makes it easier to sell to the government.  A 1003.1 implementation
  380. makes a 1003.9 implementation very straightforward (almost entirely a
  381. library layer on top of 1003.1).
  382.  
  383. >   If I used this "standard" I would actually sacrifice portability in
  384. >   some ways.  I'd have to change perfectly standard, portable f90
  385. >   constructs to calls available only on unix systems (and perhaps
  386. >   not on all of them).
  387.  
  388. No.  You use F90 for everything that you can do with it and use 1003.9
  389. only for those things you can't.
  390.  
  391. >3. Yes, there are things I need/want to do that aren't within the
  392. >   confines of standard, portable, f90.  My approach will continue to
  393. >   be, as it has been in the past, to isolate such system-dependent
  394. >   code to a small set of routines that I port to the various relevant
  395. >   systems.  I abstract and simplify the required interface enough that
  396. >   it should be relatively easy to write the routines for the various
  397. >   systems.
  398. >
  399. >   The 1003.9 routines are far too obscure and far too tied to unix to
  400. >   be adopted as my system-dependent interface.  It is not a small set
  401. >   of routines and it is not abstracted at all.  The extent that I
  402. >   might make use of 1003.9 is that one of the system-dependent
  403. >   versions of my routines might someday call some of the 1003.9
  404. >   routines.  In this, the 1003.9 stuff would be no more than one
  405. >   other implementation of my system-dependent routines.
  406.  
  407. Good enough.  Note that (assuming vendors implement the standard of course)
  408. your layer on top of 1003.9 will work on all POSIX 1003.9 compliant systems,
  409. thus limiting the number of system-dependent layered interfaces you would
  410. need to implement.
  411.  
  412. >Richard Maine
  413. >maine@altair.dfrf.nasa.gov
  414.  
  415. Thanks again for your feedback!
  416.  
  417.                 Dan Magenheimer
  418.  
  419. ##############################################################################
  420. >From maine@altair.dfrf.nasa.gov Thu Jul 30 11:38 MDT 1992
  421. From: maine@altair.dfrf.nasa.gov (Richard Maine)
  422. To: djm@caboose.fc.hp.com
  423. Cc: maine@altair.dfrf.nasa.gov
  424. Subject:  CALLING UNIX (PORTABLY) FROM FORTRAN
  425.  
  426. On Thu, 30 Jul 92 09:59:45 -0600, Dan Magenheimer <djm@caboose.fc.hp.com> said:
  427.  
  428. Dan> I too am fully supportive of Fortran 90 (and managed some of the HP early
  429. Dan> investigations into it).  Still, given the large number of programmers
  430. Dan> using F66 well into the eighties, we were certain that F77 bindings
  431. Dan> would be useful for some time to come.
  432.  
  433. Almost certainly true for some people.  I wasn't trying to claim that my
  434. reponse was typical of "most" users.  I'll leave that kind of unsupported
  435. statements to the politicians.  I was just answering for me.
  436.  
  437. Dan> I'd still be interested in your answers to the original questions, as
  438. Dan> they apply to a "future F90 binding"?  Would you use it?  Would you
  439. Dan> encourage vendors to provide it?
  440.  
  441. Probably yes on both counts.  I hadn't realized that your question was
  442. meant to cover the "future f90 binding" as well.  It is hard to say for
  443. sure without seeing yet even a rough outline of what it would be like,
  444. but my guess would be that yes, I would use an f90 binding.
  445.  
  446. Dan> As for "C/unix-ness", we had a very difficult task bridging the
  447. Dan> cultural gap between Fortran and C/Unix.  We thought that, if
  448. Dan> anything, we leaned more in the direction of Fortran than C/Unix.
  449. Dan> Much of the cryptic/unnatural style was imposed by the constraint
  450. Dan> of sticking to the F77 standard and common Fortran coding
  451. Dan> conventions (e.g. subroutines).
  452.  
  453. Yes, I recognize the f77 subroutine interface as being the source of
  454. some of the obscurity, but some of it is "pure" unix.  Things like the
  455. whole security system.  For instance the use of 3 digit octal numbers
  456. to set modes.  Yukk!  That's cryptic and obscure by any standard I'm
  457. used to; even the terminology of it is obscure.  I'd have never
  458. thought to look for something called anything close to chmod (or
  459. whatever the 1003.9 equivalent name is - I forget) to set security.
  460. Oh, "mode" means security?  (I'm not really asking.  I know the
  461. answer, but most Fortran programmers I talk to don't.)  This is the
  462. kind of thing I mean by referring to the interface as obscure and
  463. C/unix style.
  464.  
  465. A subroutine name like set_security would make a lot more sense.  (You
  466. did say that you allowed long variable names - take out the underscore
  467. if you want to otherwise stay f77 standard).  And make the arguments
  468. something more meaningful than an octal number.  (No, I haven't sat
  469. down to actually design such an interface myself.  I am well aware
  470. that it is far from trivial).
  471.  
  472. >   If I used this "standard" I would actually sacrifice portability in
  473. >   some ways.  I'd have to change perfectly standard, portable f90
  474. >   constructs to calls available only on unix systems (and perhaps
  475. >   not on all of them).
  476.  
  477. Dan> No.  You use F90 for everything that you can do with it and use 1003.9
  478. Dan> only for those things you can't.
  479.  
  480. I was alluding to things like the i/o, where I have to abandon all
  481. standard Fortran i/o on a file to get a single non-Fortran feature in
  482. the open.  There I have to actually sacrifice portability to use the
  483. 1003.9 approach.  It is more portable to find the system-dependent
  484. way of diddling the Fortran open than to abandon the Fortran i/o.
  485.  
  486. Yes, I know, I hadn't stated this clearly.  I was trying to avoid my
  487. (usual) tendency to be overly wordy.  In the process, I left out a
  488. few too many of the needed words.
  489.  
  490. >   of routines and it is not abstracted at all.  The extent that I
  491. >   might make use of 1003.9 is that one of the system-dependent
  492. >   versions of my routines might someday call some of the 1003.9
  493. >   routines.  In this, the 1003.9 stuff would be no more than one
  494. >   other implementation of my system-dependent routines.
  495.  
  496. Dan> Good enough.  Note that (assuming vendors implement the standard
  497. Dan> of course) your layer on top of 1003.9 will work on all POSIX
  498. Dan> 1003.9 compliant systems, thus limiting the number of
  499. Dan> system-dependent layered interfaces you would need to implement.
  500.  
  501. Yes, that would be a help.  And if it turns out that vendors implement
  502. the 1003.9 stuff, I probably will do one of my system-dependent
  503. "wrappers" for it.  I'm not likely to push them for it though.
  504. I'd be more likely to push them for a more natural f90 binding,
  505. possibly one compliant with the POSIC f90 binding standard if one
  506. comes out (even in draft form).
  507.  
  508. --
  509. Richard Maine
  510. maine@altair.dfrf.nasa.gov
  511.  
  512. ##############################################################################
  513. >From djm Thu Jul 30 12:45:44 1992
  514. To: maine@altair.dfrf.nasa.gov
  515. Subject: Re:  CALLING UNIX (PORTABLY) FROM FORTRAN
  516.  
  517. >>From maine@altair.dfrf.nasa.gov Thu Jul 30 11:38 MDT 1992
  518. >Subject:  CALLING UNIX (PORTABLY) FROM FORTRAN
  519. >
  520. >Dan> No.  You use F90 for everything that you can do with it and use 1003.9
  521. >Dan> only for those things you can't.
  522. >
  523. >I was alluding to things like the i/o, where I have to abandon all
  524. >standard Fortran i/o on a file to get a single non-Fortran feature in
  525. >the open.  There I have to actually sacrifice portability to use the
  526. >1003.9 approach.  It is more portable to find the system-dependent
  527. >way of diddling the Fortran open than to abandon the Fortran i/o.
  528.  
  529. I'm not much of an expert on this area, but my recollection and interpretation
  530. is that this is not the case.  Mixing the I/O models is allowed if
  531. the file is opened when the POSIX I/O flag is set.  Of course, then
  532. all FORTRAN I/O is "layered" on top of POSIX I/O, which will probably
  533. result in lower performance on some machines.  And sequential formatted
  534. files are newline-delimited.  But other than these restrictions, I think
  535. you're OK.  (This was a late change to the standard.  Do you have an
  536. older draft?)
  537.  
  538. >Dan> As for "C/unix-ness", we had a very difficult task bridging the
  539. >Dan> cultural gap between Fortran and C/Unix.  We thought that, if
  540. >Dan> anything, we leaned more in the direction of Fortran than C/Unix.
  541. >Dan> Much of the cryptic/unnatural style was imposed by the constraint
  542. >Dan> of sticking to the F77 standard and common Fortran coding
  543. >Dan> conventions (e.g. subroutines).
  544. >
  545. >Yes, I recognize the f77 subroutine interface as being the source of
  546. >some of the obscurity, but some of it is "pure" unix.  Things like the
  547. >whole security system.  For instance the use of 3 digit octal numbers
  548. >to set modes.  Yukk!  That's cryptic and obscure by any standard I'm
  549. >thought to look for something called anything close to chmod (or
  550. >whatever the 1003.9 equivalent name is - I forget) to set security.
  551. >Oh, "mode" means security?  (I'm not really asking.  I know the
  552. >answer, but most Fortran programmers I talk to don't.)  This is the
  553. >kind of thing I mean by referring to the interface as obscure and
  554. >C/unix style.
  555. >
  556. >A subroutine name like set_security would make a lot more sense.  (You
  557. >did say that you allowed long variable names - take out the underscore
  558. >if you want to otherwise stay f77 standard).  And make the arguments
  559. >something more meaningful than an octal number.  (No, I haven't sat
  560. >down to actually design such an interface myself.  I am well aware
  561. >that it is far from trivial).
  562.  
  563. After the way the naming ended up, I might be inclined to agree with you.
  564. On the other hand, having a link to the Unix culture has its advantages
  565. to.  E.g. if you tell your local Unix expert that you need to make
  566. a file readonly, he/she'll tell you to use "chmod".  With our naming
  567. model, the Fortran programmer just adds a prefix and looks it up.  Yes,
  568. I know that a good cross-reference table shoots that argument in the foot
  569. but that was probably the main reason it ended up that way.
  570.  
  571. By the way, I assume you don't mind if I post your responses?
  572.  
  573.                 Dan
  574.  
  575. ##############################################################################
  576. >From maine@altair.dfrf.nasa.gov Thu Jul 30 13:15 MDT 1992
  577. From: maine@altair.dfrf.nasa.gov (Richard Maine)
  578. Subject:  CALLING UNIX (PORTABLY) FROM FORTRAN
  579.  
  580. On Thu, 30 Jul 92 12:45:45 -0600, Dan Magenheimer <djm@caboose.fc.hp.com> said:
  581.  
  582. Dan> But other than these restrictions, I think
  583. Dan> you're OK.  (This was a late change to the standard.  Do you have an
  584. Dan> older draft?)
  585.  
  586. Quite possible.  (It is even more possible that I have both an older and a
  587. newer draft and didn't study the differences in detail to notice things
  588. like that).  I was not directly checking the draft when writing my
  589. reply to you, but was relying on my memory of what I recalled from
  590. reading through it earlier.
  591.  
  592. Dan> By the way, I assume you don't mind if I post your responses?
  593.  
  594. Fine.  Your original post said that you might.  A few of the things I
  595. said were phrased in ways that might have tended to be "flame bait" if
  596. I posted them, but that should be less of a problem if they are
  597. incorporated into a summary.  (By the way, thanks for not taking them
  598. that way and giving instead constructive feedback).
  599.  
  600. --
  601. Richard Maine
  602. maine@altair.dfrf.nasa.gov
  603.  
  604. ##############################################################################
  605. ##############################################################################
  606.         ORIGINAL POSTING
  607. ##############################################################################
  608. >From djm@hpfcso.fc.hp.com Tue Jul 28 12:13 MDT 1992
  609. From: djm@hpfcso.fc.hp.com (Dan Magenheimer)
  610. Subject: CALLING UNIX (PORTABLY) FROM FORTRAN
  611. Newsgroups: comp.lang.fortran
  612.  
  613. WANT TO CALL UNIX PORTABLY FROM FORTRAN?  Read this:
  614.  
  615. (Since only a small percentage of Fortran programmers read notes, please
  616. forward this message to others who might be interested.  Thanks!)
  617.  
  618. The IEEE Standards Board has recently approved IEEE Std 1003.9 aka
  619. "Fortran Bindings for POSIX".  Published copies should be available
  620. in a couple of months from IEEE.
  621.  
  622. As an ex-member of the committee, I'd like to poll the user community
  623. to determine 1) whether you will use it, and 2) whether you will be
  624. encouraging your system and/or Fortran vendors to provide it.
  625.  
  626. What is "it"?  Here's a brief description:
  627.  
  628. IEEE Std 1003.9 is/contains/standardizes:
  629.  
  630. o A portable way to call all POSIX system calls.  The standard uses
  631.   FORTRAN 77 standard features with only one extension -- long subroutine
  632.   names.  Examples: chmod, chdir, pipe, fork/exec, signal routines, getpid.
  633. o Access to system constants, both static and dynamic.  Examples: LINK_MAX,
  634.   PIPE_BUF, PATH_MAX, stat modes, open modes.
  635. o Access to system structures, such as stat.
  636. o A POSIX-based FORTRAN I/O layer which allows (portable) usage of files,
  637.   pipes, and devices that do not use record-based FORTRAN conventions.
  638.   Requirements are also defined for interactions between record-based
  639.   FORTRAN I/O and POSIX-based FORTRAN I/O.  Also, getc/putc equivalents.
  640. o Environment access routines (e.g. command line arguments, ENV access)
  641. o MIL-STD-like support routines (e.g. ior, and, not)
  642. o Extensibility.  All interfaces use a consistent set of conventions that
  643.   can be easily applied by a vendor to non-POSIX calls.
  644.  
  645. Much of this of course already exists but differs from vendor to vendor
  646. and is therefore not portable.  IEEE Std 1003.9 encourages portability.
  647. Of course, portability is not obtained unless the standard is supported
  648. by vendors, and it won't be supported by vendors unless users (YOU!)
  649. ask for it.
  650.  
  651. Caveats:  As you will see if you look at the standard (and as may be pointed
  652. out by some who opposed the standard), the standard contains some
  653. compromises that may be considered less than aesthetic.  This tends to be
  654. true of any standard, but the reasoning for each decision is carefully
  655. described in the Rationale appendix to the standard. Also, some areas
  656. that might have proved useful to standardize were left out to increase
  657. consensus.  These may be standardized by future standards committees.
  658.  
  659. Still, we're proud that we were able to complete the standards process
  660. and would like to find out if and how widely it would be used.  So,
  661. please reply to this message (email or notes/news) with:
  662.  
  663.    1) Will you use it if its available? (Optional: How? Why? When?)
  664.    2) Will you be encouraging your system/Fortran vendor to provide it?
  665.  
  666. I will openly post email responses.
  667.  
  668. Finally, if you are interested in participating in related POSIX/FORTRAN
  669. standardization activities, please contact Michael Hannah, mjhanna@sandia.org.
  670.  
  671.                 Thanks,
  672.                 Dan Magenheimer
  673.                 POSIX 1003.9 (ex-)Technical Editor
  674.                 djm@fc.hp.com
  675.                 FAX: 303-229-6409
  676.