From: Paul Sture on
In article <vilain-9778F8.11202727012010(a)news.individual.net>,
Michael Vilain <vilain(a)NOspamcop.net> wrote:

> In article <270120101333290569%nospam(a)nospam.invalid>,
> nospam <nospam(a)nospam.invalid> wrote:
>
> > In article <vilain-BB44A0.09502727012010(a)news.individual.net>, Michael
> > Vilain <vilain(a)NOspamcop.net> wrote:
> >
> > > HATE Pascal. It's upside down (with subroutines first).
> >
> > declaring something before using it is hardly upside down. you need to
> > do that with variables, for example.
>
> FORTRAN could do it. You can put all the declarations in front if you
> want. Most didn't bother, trusting the compiler's defaults. I declared
> everything as it helped with optimization (DEC's Fortran had some of the
> best optimization code out there). I sometimes wished for a
> "uninitialized variable warning". Guess that's why C header files
> seemed like such a good idea to me. Actually, I just think it's many
> vendor's implementation as a single pass compiler. Fortran et al did
> multiple passes. C does it with a preprocessor.

DEC FORTRAN 77 had/has an "implicit none" statement to force undeclared
variables to be flagged as errors.

> Again, I think we're veering into a religious aspect of this discussion
> and there's no cheese down that tunnel.

In my experience it should be horses for courses; pick the right
compiler/tool for the job in hand. Unfortunately fads get in the way of
that.

Of course when compilers were expensive, you were stuck with what you
were given.

I still like COBOL when it's the right tool for the job, although I'm
not sure I can get my head around the idea of OO-COBOL :-)

--
Paul Sture
From: Tim Streater on
On 28/01/2010 00:38, Salmon Egg wrote:
> In article<vilain-09BA92.15041627012010(a)news.individual.net>,
> Michael Vilain<vilain(a)NOspamcop.net> wrote:
>
>>> A good FORTRAN programmer can write a FORTRAN program in *any* language.
>>> ;-)
>>
>> So true. I found that out when I wrote a program in C and found that
>> the variables in subroutines didn't retain their values when you exited
>> back to the main program. "Automatic what?" I said as my friend the C
>> wizard explained what was going on.
>
> IIRC, which I may not, FORTRAN calls were always by reference. In
> particular, Pascal calls could be either value or by reference. FORTRAN
> calls could be made by value because the value, even a constant, was
> located at some address.
>
> I do not know if things have changed, but this peculiarity of FORTRAN
> prevented truly recursive routines. I remember reading some Wirth
> routines that used recursive routines to greatly reduce the size and
> complexity of source code.

Why not look at PHP. I write all my scripts with that, for example. I
view it as replacement for C but with much the same language features.

--
Tim

"That excessive bail ought not to be required, nor excessive fines
imposed, nor cruel and unusual punishments inflicted"

Bill of Rights 1689
From: Richard Maine on
Paul Sture <paul.nospam(a)sture.ch> wrote:

> DEC FORTRAN 77 had/has an "implicit none" statement to force undeclared
> variables to be flagged as errors.

As did almost all of the f77 compiers of later years. And all f90
compilers have it, as it was standardized then. That was one of the f90
features that was just an adoption of existing practice.

Michael said:

> > Again, I think we're veering into a religious aspect of this discussion
> > and there's no cheese down that tunnel.
>
> In my experience it should be horses for courses; pick the right
> compiler/tool for the job in hand.

Indeed.

I've posted several things about Fortran in this thread. That happens to
be an area of expertise and interest of mine. But I'm not meaning the
posts to advocate that the OP should use Fortran for his purposes. In
fact, I'd guess it probably would not be a good choice. I'm just posting
to clarify or expand on matters that others have brought up about the
language, generally as side comments.

--
Richard Maine | Good judgment comes from experience;
email: last name at domain . net | experience comes from bad judgment.
domain: summertriangle | -- Mark Twain