From: rfengineer55 on
On Jun 28, 11:30 pm, nos...(a)see.signature (Richard Maine) wrote:
> rfengineer55 <rfenginee...(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

Richard,

Understood.

I'm also not interested in starting a war or any other similar
childish nonsense. Only interested in a meaningful discussion here.

I was more interested in a simple thumbnail scratch regarding any
possible features that fortran has over the various versions of C. It
would appear from what's been posted here, that there really isn't
anything Fortran can do than the others can't. That is, from a
practical point of view of "can't."

Thank you for your comments.

Jeff

RF ENGINEER55
From: Louis Krupp on
On 6/29/2010 1:01 PM, Ron Shepard wrote:
> In article<Vu2dnZxfzsu_c7TRnZ2dnUVZ_gOdnZ2d(a)supernews.com>,
> "Gary L. Scott"<garylscott(a)sbcglobal.net> wrote:
>
>>> I would tend to believe that C, C++, and C# can do more than Fortran
>>> can do. Just an educated guess on my part.
>>
>> Many of those complex structures are ill-advised abominations.
>
> A good example of this is multidimensional arrays which I indicated
> earlier. Since C did not allow these (except with constant dimensions,
> I think was the exception), everyone was forced to implement various
> hacks to work around this shortcoming of the language. Usually this
> involved arrays of pointers, or arrays of pointers to pointers, or some
> such, depending on the dimension of the matrix. If this is an example
> of C "doing more than Fortran", then that is surely trying to turn a
> liability into an asset.
>
> Even though fortran does support these kinds of data structures, it is
> often better to avoid them. Allocatable arrays in fortran, for example,
> have several advantages over the analogous pointer approach, and that is
> often the preferred data type given the various options. As far as I
> know, even modern C does not support multidimensional allocatable
> arrays, and it gives the programmer no control over the lower bounds
> within the array, so it is some 30+ years behind fortran in some ways,
> and 20+ years behind fortran in others. I don't know about the latest
> version of the other languages in this thread title in this respect.

In C++, you can write a class to implement a multidimensional array. Or
you can download a Boost library:

http://www.boost.org

I've read some of the documentation. At first glance, this appears to
be nontrivial. I suspect that simple cases would be easier to code in
Fortran.

FWIW, ALGOL let the programmer specify lower bounds long before Fortran.
Meanwhile, Burroughs Extended ALGOL implemented multidimensional
arrays as arrays of pointers. This was a "feature."

Louis
From: rfengineer55 on
On Jun 29, 12:53 am, Ron Shepard <ron-shep...(a)NOSPAM.comcast.net>
wrote:
> In article
> <918d5e01-2848-40cc-8894-744a58a4e...(a)d37g2000yqm.googlegroups.com>,
>
>  rfengineer55 <rfenginee...(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- Hide quoted text -
>
> - Show quoted text -

Ron,

It serves no useful purpose for you to guess what i read, and did not
read. It's more a matter of what I chose to comment on, and what not
to comment on.

I'm just jooking for some very general information, and language is a
matter of individual preference. That's not where i am/was going.

Thanks to all for the information.

RF ENGINEER55
From: Louis Krupp on
On 6/29/2010 2:13 PM, rfengineer55 wrote:
<snip>
> It
> would appear from what's been posted here, that there really isn't
> anything Fortran can do than the others can't.

Or vice versa.

> That is, from a
> practical point of view of "can't."

"Can't" has a technical definition; see "Turing complete."

If you want to discuss what's easy to do in a given language, or which
language you enjoy writing, that's a different story.

Louis
From: Steve Fry on
"rfengineer55" asked this question:
> 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#
>

Since the CPUs on todays computers are not getting any faster (as was
promised 20 years ago), my main concern is what will crunch numbers faster.

So which compiler or language is best suited for faster processing?

-- Steve F.