RE: Bad programming style?



In a previous article, David Buchan <david@xxxxxxxxxxxx> wrote:
>What is the general concensus on this snippet of code?
>
>I like it because it is readable and brief. To me it is an elegant
>solution to converting a real nunber to string, but I'm not so sure its
>good style - good style meaning something that uses FORTRAN the way it
>was intended.
>
>----------
>real val
>character string*5
>
>val=7.18139265
>write (string, '(1F4.2)') val
>----------
>
>What do the style sticklers in the audience think?
>
>Dave
I'm not a style stickler .. but I use it all the time
(except I wouldn't have put 1F, just F)
Chris
.



Relevant Pages

  • Bad programming style?
    ... What is the general concensus on this snippet of code? ... To me it is an elegant ... solution to converting a real nunber to string, but I'm not so sure its ...
    (comp.lang.fortran)
  • Re: Bad programming style?
    ... > What is the general concensus on this snippet of code? ... > solution to converting a real nunber to string, ...
    (comp.lang.fortran)