From: A Watcher on
Craig Powers wrote:
> A Watcher wrote:
>> jfh wrote:
>>> On May 7, 8:46 am, Allamarein <matteo.diplom...(a)gmail.com> wrote:
>>>> I'm a newbie in Fortran 77. It's possible to find a manual with built-
>>>> in statements and that show this language, without digressing too
>>>> much?
>>>
>>> The best book I know on that is "Effective Fortran 77" by Michael
>>> Metcalf, Oxford 1990, but it has long been out of print because that
>>> Fortran dialect has been out of date for 20 years, so you may well
>>> find it only in libraries and on the shelves of oldies. But why is a
>>> newbie doing f77 anyway instead of f95 or f2003?
>>>
>>> -- John Harper
>>
>> F77 is pretty easy to understand and learn if you have any kind of
>> math aptitude. The advanced features and syntax of f90 and up obscure
>> the language, in my opinion. I think it would be wise to learn the
>> basics before going on to the esoteric stuff, especially if you don't
>> already know some other programming languages.
>
> The following F90 and beyond features are pretty much essential to
> writing easy-to-understand and easy-to-debug code:
>
> * Lower case characters
> * Identifiers longer than six characters
> * Modules for global data
> * IMPLICIT NONE
>
> In a larger code, the following additional features are pretty much
> essential to writing good code:
>
> * Allocatable variables (necessary for compile-once-run-many code)
> * Modules for interface checking on routines
>
> None of that is "esoteric", especially if you already have some exposure
> to other languages, and I've never found any of it to "obscure the
> language" either.

My original posting referred to someone who hadn't done any programming.
The syntax of F90/95 for declaring variables is long winded and it is
hard for a beginner to pick out the wheat from the chaff.
From: Craig Powers on
A Watcher wrote:
>
> My original posting referred to someone who hadn't done any programming.
> The syntax of F90/95 for declaring variables is long winded and it is
> hard for a beginner to pick out the wheat from the chaff.

I don't find it to be particularly long-winded or particularly difficult
to understand (and to the extent that it is long-winded, it's in the
service of making it easier to understand). You start with the type,
add the attributes, and then have a nice visual indicator (the
double-colon) separating all the descriptive information from the
variable name itself.
From: A Watcher on
Craig Powers wrote:
> A Watcher wrote:
>>
>> My original posting referred to someone who hadn't done any
>> programming. The syntax of F90/95 for declaring variables is long
>> winded and it is hard for a beginner to pick out the wheat from the
>> chaff.
>
> I don't find it to be particularly long-winded or particularly difficult
> to understand (and to the extent that it is long-winded, it's in the
> service of making it easier to understand). You start with the type,
> add the attributes, and then have a nice visual indicator (the
> double-colon) separating all the descriptive information from the
> variable name itself.

I see it as a good example of a programming language designed by a
committee, something for everyone.
From: Craig Powers on
A Watcher wrote:
> Craig Powers wrote:
>> A Watcher wrote:
>>>
>>> My original posting referred to someone who hadn't done any
>>> programming. The syntax of F90/95 for declaring variables is long
>>> winded and it is hard for a beginner to pick out the wheat from the
>>> chaff.
>>
>> I don't find it to be particularly long-winded or particularly
>> difficult to understand (and to the extent that it is long-winded,
>> it's in the service of making it easier to understand). You start
>> with the type, add the attributes, and then have a nice visual
>> indicator (the double-colon) separating all the descriptive
>> information from the variable name itself.
>
> I see it as a good example of a programming language designed by a
> committee, something for everyone.

How would you convey the same information? What's your ideal (be it
actual practice in another language or a personal design)? To pick
something obvious that I'm somewhat familiar with, C/C++ is a lot more
concise, at the expense of readability and truly being difficult to
understand.
From: Richard Maine on
Craig Powers <craig.powers(a)invalid.invalid> wrote:

> A Watcher wrote:
> >
> > My original posting referred to someone who hadn't done any programming.
> > The syntax of F90/95 for declaring variables is long winded and it is
> > hard for a beginner to pick out the wheat from the chaff.
>
> I don't find it to be particularly long-winded or particularly difficult
> to understand...

Indeed my reaction is exactly the opposite of Watcher's (though this
begins to not surprise me). I find the f77 syntax complicated and
confusing. On the whole, I'd find things much better if the f77 syntax
were disallowed, but alas, that is not practical for compatibility
reasons.

If you think, for example, that

real x

declares a local real variable named x, then you don't understand the
f77 syntax, which would not be surprising. Many people get it wrong.
I've seen experts on the committee propose text for the standard that
gets it wrong.

That declaration just says that x, whatever it is, has type real. You
have to scour all the declarations in the scoping unit to figure out
what x is. If you are using include files (not standard f77, but a
common extension), you have to scour all the posisbly relevant ones of
them as well.

For those that might not see the issue, x could be an array, it could be
in common, it could be a constant (parameter), or it could be a
function.

Even more confusing is

real cos

which might not even mean that cos is of type real, depending on
context.

--
Richard Maine | Good judgment comes from experience;
email: last name at domain . net | experience comes from bad judgment.
domain: summertriangle | -- Mark Twain
First  |  Prev  |  Next  |  Last
Pages: 1 2 3 4 5 6 7 8 9 10
Prev: proble in common
Next: GNU f90 read() run time error