Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!elroy.jpl.nasa.gov!jato!vsnyder From: vsnyder@jato.jpl.nasa.gov (Van Snyder) Newsgroups: comp.lang.fortran Subject: Re: Left justify of integers. Message-ID: <1991Jun1.043052.29008@jato.jpl.nasa.gov> Date: 1 Jun 91 04:30:52 GMT References: Reply-To: vsnyder@jato.Jpl.Nasa.Gov (Van Snyder) Distribution: comp Organization: Jet Propulsion Laboratory, Pasadena, CA Lines: 27 In article quan@sol.surv.utas.edu.au (Stephen Quan) writes: >I'm having a slight, almost trivial problem, I cannot write >integers without them being right justified. > >eg write (*,*) 5 > > gives > > ......5 (. are leading spaces) > > >Is there some format statement (i1.1 or something) that will >solve this problem? I want a general solution, not just : > > write (*,'(i1)') 5 > It was for exactly this reason that I urged X3J3, during all the public reviews, to generalize format specifications so that the "w" part was optional, as it is in "a" formats. The committee responded that the standard ALLOWS an implementor to do just this with * format. But it's hard to mix * with precise fixed formats, and, in addition, few if any vendors left justify numbers in * format. -- vsnyder@jato.Jpl.Nasa.Gov ames!elroy!jato!vsnyder vsnyder@jato.uucp