Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sun-barr!lll-winken!sol.ctr.columbia.edu!cunixf.cc.columbia.edu!shenkin From: shenkin@cunixf.cc.columbia.edu (Peter S. Shenkin) Newsgroups: comp.lang.fortran Subject: Re: Fortran 90 status Message-ID: <1991May16.195414.25217@cunixf.cc.columbia.edu> Date: 16 May 91 19:54:14 GMT Organization: Columbia University Lines: 31 In article <23881@lanl.gov> jlg@cochiti.lanl.gov (Jim Giles) writes: >9) H edit descriptors. > I disagree here. The proposed standard claims this edit descriptor can > be a source of error. So can all others. The issue here is that people > can miscount the number of characters in a string and the H descriptor > requires an accurate count... Just a coding tidbit which allows an accurate count but avoids Hollerith, for those inclined to do so. I started using the following technique a few years ago, and like it a lot. Suppose you wish to provide headers for a set of columns each row of which will be printed by a statement that looks something like this: WRITE( 6, '(x,2f8.3,3x,i4)' ) val1(i), val2(i), i(i) I would print the header in the follwing manner: WRITE( 6, '(x,2a8,3x,a4)' ) 'val1', 'val2', 'i' What I like about it is that to get your header format, you just copy the format statement you're going to use for your numeric output, changing each numeric field to a character field of the same width. This ensures proper lining up of the headers. (Of course, this works just as well with numbered FORMAT statements.) -P. ************************f*u*cn*rd*ths*u*cn*gt*a*gd*jb************************** Peter S. Shenkin, Department of Chemistry, Barnard College, New York, NY 10027 (212)854-1418 shenkin@cunixf.cc.columbia.edu(Internet) shenkin@cunixf(Bitnet) ***"In scenic New York... where the third world is only a subway ride away."***