Re: should i write keywords uppercase?
- From: "*** Russell" <richard.russell@xxxxxxxxxxx>
- Date: 3 Nov 2005 05:31:15 -0800
You likely will get a variety of philosophies in replies here. Each
programmer seems to develop his own style. Some outfits impose coding
standards for projects, for consistency, which is good. In any case,
one point to consider is that comments ought to stand out from code,
and plenty of good commenting is quite desirable. I wouldn't recommend
bulk paragraphs providing explanations that really belong in external
documentation, but enough clear commenting to allow someone reading the
code six months later (such as yourself) to know how to use a
subprogram, to follow the flow of logic and calculations, and to
connect parts of the code to pertinent external documentation.
Programming is a great investment in time, and a great deal of that
time can be lost later when the code must be reused or at least fixed
and commenting is missing or poorly done.
In most of my own code, I have used upper case for code and lower case
(with capitalization as appropriate) for comments. Whatever you work
out for yourself should at least pass the test of readability.
I imagine you'll also get advice on other readability issues, such as
whether or not an END IF should be coded without the space between the
END and IF and whether it should be indented to the same level as the
code paragraph it ends or line up with the original IF statement.
Jonas Stein wrote:
> Hi,
>
> i am a student of physics and we are going to use Fortran in our lessons
> soon.
> Now i have read in one tutorial that i should write keywords uppercase
> another says it would be more professional to write lowercase.
>
> I know, that it does not make any difference for the compiler, but for the
> readability.
>
> How do professional fortran-coder write?
> Does it depend on the family of Fortran i.e. F90, F77, ...?
>
> I think we will use F90.
>
> --
> best regards,
>
> Jonas Stein <news@xxxxxxxxxxxxx>
.
- Follow-Ups:
- Re: should i write keywords uppercase?
- From: David Flower
- Re: should i write keywords uppercase?
- From: gary . l . scott
- Re: should i write keywords uppercase?
- References:
- should i write keywords uppercase?
- From: Jonas Stein
- should i write keywords uppercase?
- Prev by Date: Re: copying files
- Next by Date: Re: should i write keywords uppercase?
- Previous by thread: Re: should i write keywords uppercase?
- Next by thread: Re: should i write keywords uppercase?
- Index(es):