From: Richard Maine on
rfengineer55 <rfengineer55(a)aol.com> wrote:

> I was asking in terms of what the Fortran language itself had
> provisions for that cold not be done in C, C++, or C#. I don't know if
> fortran can handle structured like an array of pointers, to pointers,
> to type Integer, for example.

That would not be particulary close to what a language "can do". What a
language "can do" would be solve computational problems. Your examples
sound more like a list of features. That's not a very meaningful basis
for much of anything, particularly when expressed in terms of features
of a specific language. Your examples are actually amazingly close to
Ron's description of a Fortran compiler being able to compile Fortran
code. No a Fortran compiler can't compile C code, just like a C compiler
can't compile Fortran code, but that's not a very useful comparison.

Even by the usual low standards of language wars, this is a pretty poor
start.

But as Gib noted, most people here aren't likely to be interested in
rehashing old flame wars. About all it will do is get you added to
killfiles.

But I'm probably not communicating very effectively here - just like I
apparently did not manage to communicate that I do not provide my email
address for private Fortran consulting purposes. :-(

Don't expect to see any more replies in this thread from me. I'm pretty
much expecting to see more things in it that strike me as nonsense, but
I'm not going to bother to say so any more. You can take my future
silence as making the point more effectively than I could in words.

--
Richard Maine | Good judgment comes from experience;
email: last name at domain . net | experience comes from bad judgment.
domain: summertriangle | -- Mark Twain
From: Phillip Helbig---undress to reply on
In article <i0b9nl$809$1(a)news.eternal-september.org>, Lynn McGuire
<lmc(a)winsim.com> writes:

> However, I find that the programmer is more important than the
> language. Good programmers can write good code in any language.
> Bad programmers can screw anything up.

Fortran programmers can write Fortran in any language. :-)

From: Ron Shepard on
In article
<918d5e01-2848-40cc-8894-744a58a4ebaa(a)d37g2000yqm.googlegroups.com>,
rfengineer55 <rfengineer55(a)aol.com> wrote:

> On Jun 28, 8:41�pm, Ron Shepard <ron-shep...(a)NOSPAM.comcast.net>
> wrote:
> > In article
> > <08ad53e3-f827-4d57-896b-cf6bc2450...(a)z8g2000yqz.googlegroups.com>,
> >
> > �rfengineer55 <rfenginee...(a)aol.com> wrote:
> > > What can Fortran do that C, C++, C# can't?
> >
> > One of the most important things a fortran compiler can do is that it
> > can compile fortran programs. �There are millions of lines of legacy
> > fortran, both in programs and in library routines.

I guess I should have elaborated on this a little more. Those
fortran programs are in constant use every day, and the fortran
library routines are being incorporated every day into new programs.

> > I think all of these are complete programming languages in the sense
> > that you can do anything that can be programmed.

Someone else used the correct term "Turing complete".

>�You can write a
> > fortran compiler in the other languages, for example, and compile
> > fortran programs (like gfortran does). �Or you could write a lisp
> > machine in these languages and run lisp programs. �And so on.
> >
> > If you are asking what is easier, or simpler, in fortran than in other
> > languages, then you may get a few mostly personal responses. �For
> > example, I personally think arrays are easier to work with in fortran
> > than in most other languages.
> >
> > $.02 -Ron Shepard
>
> Ron,
>
> I was asking in terms of what the Fortran language itself had
> provisions for that cold not be done in C, C++, or C#.

You must not have read the replies to your original post. Several
of them made the same point. All these languages are complete, and
you can do anything in any of them that can be programmed. I gave
some examples of this above.

> I don't know if
> fortran can handle structured like an array of pointers, to pointers,
> to type Integer, for example.

Yes. The syntax is a little different but the functionality is the
same. In fortran you would put the pointer inside of a derived
type, and then declare an array of that type.

> C can handle some complex pointer
> structures.

Oh yeah, that reminds me of complex arithmetic support. It has been
part of standard fortran since the 60's. I think some of the other
languages you mentioned have only recently gained support for
complex arithmetic. But, you could simulate it in these other
languages in various ways, so as long as you did not have to combine
code from two or more different sources that had implemented this
hack in different and incompatible ways, you could achieve what was
necessary.

> I've never seen similoar structures done if fortran, but
> I've not seen everything that Fortran can do either :-)
>
> I would tend to believe that C, C++, and C# can do more than Fortran
> can do. Just an educated guess on my part.

Again, you must not be reading the replies to your post.

As far as my earlier reply, which you also apparently did not read,
consider something as simple as the following declaration

real array(-m:m,0:n,k)

This declaration allows you to reference it as array(i1,i2,i3) where
those indices take their natural values in the mathematical
expression that you are evaluating. You aren't stuck with
zero-offset arrays, or with only one-dimensional arrays where you
have to compute the 3D index manually, you just use the
multidimensional array in the natural way.

You can achieve something similar in those other languages, but it
is not as clear and straightforward. I remember hearing a lot of
criticism of the original Numerical Recipes in C, for example, where
it was necessary to violate the standard to achieve similar
functionality (i.e. to make the code look more like the mathematical
equation that it was evaluating). And even with that illegal hack,
the code was not easy to understand and the compiler could not
provide any bounds checking support. BTW, the above is f77, an
obsolete version of the language that is over 30 years old -- modern
fortran has even better general array support.

$.02 -Ron Shepard
From: Jerry DeLisle on
On 06/28/2010 04:17 PM, dpb wrote:
> Lynn McGuire wrote:
>>> What can Fortran do that C, C++, C# can't?
>>>
>>> Along similar lines where would Fortran be a superior chice over C, C+
>>> +, or C#
>>
>> None that I know of. Here is a dated (1992) paper comparing F77,
>> F90, C and C++ for engineering pgrograms:
>> http://www.leshatton.org/Documents/JSX_0192.pdf
>
> Far too dated and superficial in the facilities of current Fortran (see
> Richard Maine's comments in other thread where it was brought up) I
> think to be of any value any longer.
>>
>> Me, myself and I, we all prefer C++. I like strong typing and
>> mandatory function prototypes. I also like function overloading.
>
> "IMPLICIT NONE" :)
>
> Generic functions exist in Fortran since F90/95 and more oo-related
> stuff is in F03/F08.
>
> I as the same trio am adamantly in the opposite camp... :)
>
> I expect the above sentiment is largely owing to not having legacy F77
> code that hasn't already been ported years ago to F95 compilers so that
> those features are now old hat. In your situation wherein you're forced
> to use a compiler last updated nearly 20 years ago now and a code base
> some of which dates to 40 years or more, it's not surprising that
> something newer looks shinier. :)
>
>> However, I find that the programmer is more important than the
>> language. Good programmers can write good code in any language.
>> Bad programmers can screw anything up.
>
> Amen...some of the best code I've ever read was written in Forth. It was
> almost as easy to read as a text. OTOH, some of the worst was also on
> the same project but by a far less adept coder. I've not doubt that same
> coders C or Fortran would also have been very poor as well.
>
> --
Wow, A Forth fan? I have written Forth interpreters. Very elegant, very practical.

In spite of all the arguments, Fortran (as it continues to evolve) is at a very
minimum, damn good!

J:)
From: glen herrmannsfeldt on
Gary L. Scott <garylscott(a)sbcglobal.net> wrote:
(snip)

> Even with software it is possible to generate non-repeating sequences.

Well, not repeating within a given time period, which could be
longer than the age of the universe. A gigabit of state will
give you an extremely long period, but it will eventually repeat.
2**(2**30)-1 seconds is a very long time. I saw some time ago a
claim that 10**136 was supposed to be the largest useful number.
That is, the volume of the universe in cubic Fermis. (Also known
as femtometers, with the convenient abreviation fm in either case.)
The volume of a proton is about 1fm.

> I don't have any precise requirement personally. But I've used some
> poor quality ones. In one case, I was trying to set random pixels (or
> actually copy a graphic at random positions) in a bitmap image and the
> RNG sequence was visually predictable. Maybe it was just a poor quality
> RNG implementation (or maybe even I was misusing it).

Many good PRNGs are not so good if you use only the low bits.
That is mostly a problem if you use ones that generate integers
and use MOD for reducing the generated number to an appropriate
small range.

But also humans are sometimes good at seeing patterns even
where there is no pattern. Consider constellations, for example.

-- glen