For Programmers: Free Programming Magazines  


Home > Archive > Fortran > August 2007 > Why Fortran?









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Why Fortran?
technohippyGD@gmail.com

2007-08-03, 7:12 pm

As my subject headline states. Why does anyone still use Fortran for
anything?

Phillip Helbig---remove CLOTHES to reply

2007-08-03, 7:12 pm

In article <1186155206.735515.136170@57g2000hsv.googlegroups.com>,
technohippyGD@gmail.com writes:

> As my subject headline states. Why does anyone still use Fortran for
> anything?


It is the best language for numerical work.

It is one of the most understandable languages for any kind of work.

There is much old code written in Fortran which continues to be used,
not just the compiled code but the source code.

It gains new features every few years (i.e. is not a dead language).

Good compilers exist for most platforms.

Note that your question already contains a judgement: the word "still".
This implies that you think that Fortran is obsolete. If so, why do you
think that?

Gordon Sande

2007-08-03, 7:12 pm

On 2007-08-03 12:33:26 -0300, technohippyGD@gmail.com said:

> As my subject headline states. Why does anyone still use Fortran for
> anything?


Some appear to use it for trolling!

Others use it for serious work. They tend to not be recent and well
indoctrinated graduates of fashion conscious computer science courses.
Some are even refugees from other languages who note that Fortran
has a modern standard that offers many useful features. The fashion
conscious seem to be stuck in 1966. But then keeping up to date and
correct is not always fashionable in all circles.

But then forecasting the weather is not fashionable even if very useful.
Or noting were seismic testing suggests one might find petroleum deposits.
Or any other of the old fashioned hard applications of serious computing.

It is probably fair to say that Fortran is not the first choice for setting
up a web store but that is likely to be only a short lived fashion. So
much for being TechnoHippy. Just useful.



Phillip Helbig---remove CLOTHES to reply

2007-08-03, 7:12 pm

In article <2007080312502075249-gsande@worldnetattnet>, Gordon Sande
<g.sande@worldnet.att.net> writes:

> It is probably fair to say that Fortran is not the first choice for setting
> up a web store but


I doubt that...

> that is likely to be only a short lived fashion.


....and that.

Basically, a web store runs a web server which executes scripts,
possibly in connection with a database. There is no reason not to write
those scripts in Fortran.

dpb

2007-08-03, 7:12 pm

technohippyGD@gmail.com wrote:
> As my subject headline states. Why does anyone still use Fortran for
> anything?


And why not, pray tell? :)

--


Beliavsky

2007-08-03, 7:12 pm

On Aug 3, 11:54 am, hel...@astro.multiCLOTHESvax.de (Phillip Helbig---
remove CLOTHES to reply) wrote:
> In article <2007080312502075249-gsande@worldnetattnet>, Gordon Sande
>
> <g.sa...@worldnet.att.net> writes:
>
> I doubt that...
>
>
> ...and that.
>
> Basically, a web store runs a web server which executes scripts,
> possibly in connection with a database. There is no reason not to write
> those scripts in Fortran.


Except that if you are using PHP or Python etc., the program, or at
least large parts of it, has probably already been written.

One reason people use Fortran is the numerical libraries that exist
for it, but many programmers have a greater need for regular
expression parsing (for example) than numerical libraries, and for
such tasks, many other languages have better library support than
Fortran.

Gordon Sande

2007-08-03, 7:12 pm

On 2007-08-03 12:54:15 -0300, helbig@astro.multiCLOTHESvax.de (Phillip
Helbig---remove CLOTHES to reply) said:

> In article <2007080312502075249-gsande@worldnetattnet>, Gordon Sande
> <g.sande@worldnet.att.net> writes:
>
>
> I doubt that...
>
>
> ...and that.
>
> Basically, a web store runs a web server which executes scripts,
> possibly in connection with a database. There is no reason not to write
> those scripts in Fortran.


First choice can mean:

1. most popular

2. the choice of a particular individual for good reasons

Choosing meaning 2 because it has merit does not invalidate meaning
1 as illustrated by the original poster TechnoHippyXX. (My corrected
typo of poser may be more accurate!)

That web stores may be a long lived application does not mean that they will
be fashionable during that long life. I would expect that a programming
language more directed at text processing would prove a better choice
for many. Text processing in C is more error prone than curent Fortrans.
Neither is a really good choice even if C is currently "popular" for the
task. If the store is a "one off side issue" then using a language that
the programmer is comfortable with would make that language a suitable
choice.

(I expect that there may be "false friend" translation issues behind
a quite reasonable technical comment.)


Dr Ivan D. Reid

2007-08-03, 7:12 pm

On Fri, 03 Aug 2007 16:16:04 GMT, Gordon Sande <g.sande@worldnet.att.net>
wrote in <2007080313160416807-gsande@worldnetattnet>:

> That web stores may be a long lived application does not mean that they will
> be fashionable during that long life. I would expect that a programming
> language more directed at text processing would prove a better choice
> for many.


Whatever happened to SNOBOL?

--
Ivan Reid, School of Engineering & Design, _____________ CMS Collaboration,
Brunel University. Ivan.Reid@[brunel.ac.uk|cern.ch] Room 40-1-B12, CERN
KotPT -- "for stupidity above and beyond the call of duty".
Dan Nagle

2007-08-03, 7:12 pm

Hello,

Dr Ivan D. Reid wrote:


> Whatever happened to SNOBOL?


Well, Griswold/Poage/Polonsky is still on _my_ bookshelf!

--

Dan Nagle
Purple Sage Computing Solutions, Inc.
Gib Bogle

2007-08-03, 7:12 pm

Why do you ask?
John H. Lindsay

2007-08-05, 7:10 pm

Dan Nagle wrote:
> Hello,
>
> Dr Ivan D. Reid wrote:
>
>
>
> Well, Griswold/Poage/Polonsky is still on _my_ bookshelf!
>


Ha ! Still available. Still viable. Still vibrant. See:

http://www.SNOBOL4.com

for all sorts of stuff and links. And there's more brewing ...

John.
Dave Seaman

2007-08-05, 7:10 pm

On Sun, 05 Aug 2007 10:38:14 -0400, John H. Lindsay wrote:
> Dan Nagle wrote:
[color=darkred]
> Ha ! Still available. Still viable. Still vibrant. See:


> http://www.SNOBOL4.com


> for all sorts of stuff and links. And there's more brewing ...


Should be <http://www.snobol4.org/>.


--
Dave Seaman
Oral Arguments in Mumia Abu-Jamal Case heard May 17
U.S. Court of Appeals, Third Circuit
<http://www.abu-jamal-news.com/>
Quadibloc

2007-08-05, 7:10 pm

technohipp...@gmail.com wrote:
> As my subject headline states. Why does anyone still use Fortran for
> anything?


Your question might seem quite legitimate at first glance.

After all, the last widely-used version of FORTRAN, for which you will
find textbooks lying around in thrift shops, is FORTRAN 77.

Newer versions of FORTRAN exist, Fortran 90, Fortran 95, and, IIRC,
Fortran 2003. But most people haven't heard of them.

If you are programming for a numerical calculation, Fortran has some
advantages.

Compared to C, you don't have to begin your program with

#include <math.h>

just because you want to use trig functions.

And Fortran includes 32-bit versions of all the math routines, while C
has *only* double-precision floating-point. So, in Fortran, you can
use just the precision you need, and have your program run faster. (Of
course, on some hardware, some of this advantage is lost.)

Computers designed for numerical problems, like CRAY supercomputers,
come *with* Fortran compilers, instead of, or at least in addition to,
compilers for C or Pascal.

John Savard

Tim Prince

2007-08-05, 7:10 pm

Quadibloc wrote:
> technohipp...@gmail.com wrote:
>
> Your question might seem quite legitimate at first glance.
>
> After all, the last widely-used version of FORTRAN, for which you will
> find textbooks lying around in thrift shops, is FORTRAN 77.
>
> Newer versions of FORTRAN exist, Fortran 90, Fortran 95, and, IIRC,
> Fortran 2003. But most people haven't heard of them.

Some people think they are using C, but haven't heard of C89, much less C99.
>
> If you are programming for a numerical calculation, Fortran has some
> advantages.
>
> Compared to C, you don't have to begin your program with
>
> #include <math.h>
>
> just because you want to use trig functions.
>
> And Fortran includes 32-bit versions of all the math routines, while C
> has *only* double-precision floating-point.

So you haven't heard of C89 or C99 either. Not quite fair to advocate
f90 or newer without considering standard C or C++. True, <tgmath.h>
support (resembling f77 generic math functions) is seldom counted upon.
>So, in Fortran, you can
> use just the precision you need, and have your program run faster. (Of
> course, on some hardware, some of this advantage is lost.)

I don't know of any difference here, compared with C.
>
> Computers designed for numerical problems, like CRAY supercomputers,
> come *with* Fortran compilers, instead of, or at least in addition to,
> compilers for C or Pascal.


Yes, Fortran remains more widely available than Pascal. Wasn't that a
while ago, like before C89 or f90?
Terence

2007-08-05, 7:10 pm

I think a fair answer to the original question is that
1) Fortran was designed to be readable as algebraic instructions to
perform an algorithm (as was Algol).
2) Fortran compilere are easy to find and F77 compiler more so, and
F77 source more easy to write.
3) There is an abundance of tested source code available which could
be extended to cover more scope or modified to be a faster solution to
a simpler subset of what the target objectives were.


Beliavsky

2007-08-05, 7:10 pm

On Aug 5, 5:45 pm, Terence <tbwri...@cantv.net> wrote:
> I think a fair answer to the original question is that
> 1) Fortran was designed to be readable as algebraic instructions to
> perform an algorithm (as was Algol).
> 2) Fortran compilere are easy to find and F77 compiler more so,


It is no longer true that Fortran 77 compilers are easier to find than
Fortran 90 and 95 compilers. With the possible exception of Open
Watcom, I don't know of F77 compilers still being supported and
enhanced. Gfortran is a usable F95 compiler, and g95 is reliable. Both
are free and run everywhere gcc does. Of course, all F95 compilers
will compile F77 code, with the exception of g95, which does not
handle at least one deleted feature (non-integer loop counters).

Quadibloc

2007-08-05, 7:10 pm

Tim Prince wrote:
> So you haven't heard of C89 or C99 either. Not quite fair to advocate
> f90 or newer without considering standard C or C++. True, <tgmath.h>
> support (resembling f77 generic math functions) is seldom counted upon.


You're quite right - if I'm going to ask people to be fair to Fortran,
I should be fair to C!

> Yes, Fortran remains more widely available than Pascal. Wasn't that a
> while ago, like before C89 or f90?


Pascal is certainly widely available for PCs - just buy Borland's
Delphi. Usually, the Fortran compiler will have been *written* in C,
though, so even for the supercomputers a C compiler is available.

John Savard

fred

2007-08-06, 4:22 am

Quadibloc <jsavard@ecn.ab.ca> a écrit :

> If you are programming for a numerical calculation, Fortran has some
> advantages.
>
> Compared to C, you don't have to begin your program with
>
> #include <math.h>
>
> just because you want to use trig functions.


Sorry, I can't call it a divantage to include math.h

--
http://scipy.org/FredericPetit
fred

2007-08-06, 4:22 am

Terence <tbwright@cantv.net> a écrit :


> 2) Fortran compilere are easy to find and F77 compiler more so, and
> F77 source more easy to write.

Disagree.

I prefer from far to write C code that F77 (not "case" aware,
indentation, etc...)

--
http://scipy.org/FredericPetit
tholen@antispam.ham

2007-08-06, 8:06 am

fred writes:

> Terence a écrit :


[color=darkred]
> Disagree.
>
> I prefer from far to write C code that F77 (not "case" aware,
> indentation, etc...)


You can indent Fortran. No advantage or divantage. As for case
sensitivity, I greatly prefer NOT having case sensitivity. Treating
Sum differently from sum is asking for programming errors.

fred

2007-08-06, 7:07 pm

tholen@antispam.ham a écrit :

> fred writes:
>
>
>
>
> You can indent Fortran. No advantage or divantage.

AFAIK you have to begin on column 6, not above 73, etc.
Painful.

> As for case
> sensitivity, I greatly prefer NOT having case sensitivity. Treating
> Sum differently from sum is asking for programming errors.


--
http://scipy.org/FredericPetit
fred

2007-08-06, 7:08 pm

tholen@antispam.ham a écrit :

Another divantage:

In C, printing _correctly_ to stdout is far much easier.

Only my own point of view ;-)

--
http://scipy.org/FredericPetit
Gordon Sande

2007-08-06, 7:08 pm

On 2007-08-06 13:02:25 -0300, fred <fredantispam@free.fr> said:

> tholen@antispam.ham a écrit :
>
> AFAIK you have to begin on column 6, not above 73, etc.
> Painful.


You begin in column 7 with as many leading blanks as you care to
(subject to staying within col 72) in fixed form. Free form, which
has been standard as of Fortran 90, is as relaxed as they come.
The convention are safe under the "telephone test" in which you try
to discuss (debug) a listing over the phone withouut a common listing
in from of you. How do you pronounce Test, test and TEST when you
are in a hurray?

Long before C was around and keypunchs were the standard folks
found that adding those leading blanks were a drag so the "real men"
did not bother. And all the young men who think old still follow
those rules.

Coffee in the morning is used by some to wake up. Try it!
[color=darkred]


dpb

2007-08-06, 7:08 pm

fred wrote:
> tholen@antispam.ham a écrit :
>
> AFAIK you have to begin on column 6, not above 73, etc.
> Painful.


Only if you insist on using compilers which are now some 30 years out of
date (F77-only as opposed to F90/F95). Note that for all practical
purposes F77 syntax is valid F90/F95 as well so that if there is some
desire to constrain oneself to that subset (why anyone chooses to do so
is beyond my comprehension, but there seem to be some who do) it doesn't
prevent the use of free source form.

So, that is a totally artificial "divantage" at best imo...

--
dpb

2007-08-06, 7:08 pm

fred wrote:
> tholen@antispam.ham a écrit :
>
> Another divantage:
>
> In C, printing _correctly_ to stdout is far much easier.


What is the definition of _correctly_ that you think Fortran doesn't
accomplish and what, specifically, comprises "easier" and as compared to
what?

--
Paul van Delst

2007-08-06, 7:08 pm

fred wrote:
> Terence <tbwright@cantv.net> a écrit :
>
>
> Disagree.
>
> I prefer from far to write C code that F77 (not "case" aware,
> indentation, etc...)


I prefer to write C code than f77 too - and I've never written C code.

:o)

cheers,

paulv
tholen@antispam.ham

2007-08-06, 7:08 pm

fred writes:

[color=darkred]
[color=darkred]
[color=darkred]
[color=darkred]
> AFAIK you have to begin on column 6, not above 73, etc.
> Painful.


Like so many others who criticize Fortran unfairly, you're stuck in
the past. Fortran statements can begin in column 1 and extend beyond
column 72. Where have you been for the past decade? Furthermore,
even with the old standard, you could STILL indent.
[color=darkred]

tholen@antispam.ham

2007-08-06, 7:08 pm

fred writes:

> tholen@antispam.ham a écrit :


You didn't quote any text of mine. So why the attribution above?

> Another divantage:
>
> In C, printing _correctly_ to stdout is far much easier.


Define "correctly".

John H. Lindsay

2007-08-06, 7:08 pm

Dave Seaman wrote:
> On Sun, 05 Aug 2007 10:38:14 -0400, John H. Lindsay wrote:
>
>
>
>
> Should be <http://www.snobol4.org/>.


Both still there and they refer to each other. The list of
links on the second reference is a good and extensive one.

John.
fred

2007-08-06, 7:08 pm

tholen@antispam.ham a écrit :

> fred writes:
>
>
>
>
>
>
> Like so many others who criticize Fortran unfairly, you're stuck in
> the past. Fortran statements can begin in column 1 and extend beyond
> column 72. Where have you been for the past decade? Furthermore,
> even with the old standard, you could STILL indent.

Yes, I do discuss about f77.
And happily, I use F90 today.
But, well, I have no chance here, in a fortran newsgroup :-)

Maybe it's due to my lack of fortran knowledge (certainly),
but I can remember "goto", "format" (the "correctly" is here: AFAIK,
once again, it is not possible to write something simply as I can do
in C with "%g" and so on), but maybe I'm wrong...

BTW, this newsgroup is very indeed, and I won't deal with that longer.
Closed.

Promised, if I have to struggle against fortran code, something I can
write easily in C, I'll go back to let you explain to me how can I do it
in fortran ;-)


Cheers,

PS: how do you write this in fortran (something very simple, yes,
and deals with printf):

printf("%g %d %s\n", x, a, s);

or

for (i=0; i<10; i++)
printf("%d ", i);
printf("\n");

?

--
http://scipy.org/FredericPetit
Richard Maine

2007-08-06, 7:08 pm

fred <fredantispam@free.fr> wrote:

> PS: how do you write this in fortran (something very simple, yes,
> and deals with printf):
>
> printf("%g %d %s\n", x, a, s);


I don't speak C well enough to understand that well without looking it
up, but I suspect the simplest and closest equivalent would be

print *, x, a, s

> for (i=0; i<10; i++)
> printf("%d ", i);
> printf("\n");


and

print *, [(i,i=0,10)]

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

2007-08-06, 7:08 pm

On Aug 6, 6:42 pm, nos...@see.signature (Richard Maine) wrote:
> fred <fredantis...@free.fr> wrote:


<snip>

> print *, x, a, s
>
>
> and
>
> print *, [(i,i=0,10)]


Should be

print *, [(i,i=0,9)]

..

dpb

2007-08-06, 10:06 pm

fred wrote:
....

> PS: how do you write this in fortran (something very simple, yes,
> and deals with printf):
>
> printf("%g %d %s\n", x, a, s);

....

Having seen what simple really looks like :) let me pose one that
stumped everyone in the Matlab group. Matlab uses vectorized versions
of the C format strings.

The question was how to write values such as 1.234E-5 as 0.1234E-4?

--
Thierry B.

2007-08-07, 8:07 am

--{ technohippyGD@gmail.com a plopé ceci: }--

> As my subject headline states. Why does anyone still use Fortran for
> anything?


For the fun.

--
http://tontonth.free.fr/libsound77.html
Thierry B.

2007-08-07, 8:07 am

--{ Gordon Sande a plopé ceci: }--

> It is probably fair to say that Fortran is not the first choice for setting
> up a web store
>

Mmmm, I'm working on that :)


--
"All the things I really like to do are
either immoral, illegal, or fattening."
tholen@antispam.ham

2007-08-07, 8:07 am

fred writes:

[color=darkred]
[color=darkred]
[color=darkred]
[color=darkred]
[color=darkred]
[color=darkred]
> Yes, I do discuss about f77.


Why discuss a standard nearly 30 years old? Are you comparing it to
the C language of the same vintage?

> And happily, I use F90 today.


Then why discuss the FORTRAN 77 standard?

> But, well, I have no chance here, in a fortran newsgroup :-)
>
> Maybe it's due to my lack of fortran knowledge (certainly),
> but I can remember "goto", "format" (the "correctly" is here: AFAIK,
> once again, it is not possible to write something simply as I can do
> in C with "%g" and so on), but maybe I'm wrong...


If that's a literal string, then in Fortran:

WRITE (*,*) "%g"

> BTW, this newsgroup is very indeed, and I won't deal with that longer.
> Closed.
>
> Promised, if I have to struggle against fortran code, something I can
> write easily in C, I'll go back to let you explain to me how can I do it
> in fortran ;-)
>
> Cheers,
>
> PS: how do you write this in fortran (something very simple, yes,
> and deals with printf):
>
> printf("%g %d %s\n", x, a, s);
>
> or
>
> for (i=0; i<10; i++)
> printf("%d ", i);
> printf("\n");
>
> ?


Ask someone who speaks fluent C. I do not.

Dave Seaman

2007-08-07, 8:07 am

On Mon, 06 Aug 2007 15:24:45 -0400, John H. Lindsay wrote:
> Dave Seaman wrote:
[color=darkred]
> Both still there and they refer to each other. The list of
> links on the second reference is a good and extensive one.


> John.


That seems to be the case now, but it wasn't when I tried it at the time.
I was redirected to some unrelated page.


--
Dave Seaman
Oral Arguments in Mumia Abu-Jamal Case heard May 17
U.S. Court of Appeals, Third Circuit
<http://www.abu-jamal-news.com/>
dpb

2007-08-07, 7:10 pm

Richard Maine wrote:
> fred <fredantispam@free.fr> wrote:
>
>
> I don't speak C well enough to understand that well without looking it
> up, but I suspect the simplest and closest equivalent would be
>
> print *, x, a, s
>

....

Certainly simplest, but perhaps closer literally (mostly depending on
the C rules vis a vis Fortran for the G edit descriptor behavior) would be

write(*,'(G D A)') x, a, s

Certainly not much more complicated if use default field and precision
as does fred's example...

--
fred

2007-08-07, 7:10 pm

nospam@see.signature (Richard Maine) a écrit :

> fred <fredantispam@free.fr> wrote:
>
>
> I don't speak C well enough to understand that well without looking it
> up, but I suspect the simplest and closest equivalent would be
>
> print *, x, a, s

No. :-)
For several reasons:

1) I put one space char between each variable, not tab.

2) Beyond a fixed number of column (I don't remember which one),
it jumps to the next line.

>
> and
>
> print *, [(i,i=0,10)]

Same answer ;-)

PS: I use intel fortran compiler.

--
http://scipy.org/FredericPetit
fred

2007-08-07, 7:10 pm

dpb <none@non.net> a écrit :

> write(*,'(G D A)') x, a, s

With gfortran:
At line 13 of file essai.f90
Fortran runtime error: Nonnegative width required in format
(G D A)

> Certainly not much more complicated if use default field and precision
> as does fred's example...

Your answer (the use of write()) is exactly what I call "more
complicated" (than in C) ;-)

Cheers,

--
http://scipy.org/FredericPetit
fred

2007-08-07, 7:10 pm

tholen@antispam.ham a écrit :

> Then why discuss the FORTRAN 77 standard?

Because with F90, I'm still embarrassed with F77 features.
No more, no less.

But I repeat, it may be due to my lack of F90 knowledge.

Cheers,

--
http://scipy.org/FredericPetit
Beliavsky

2007-08-07, 7:10 pm

On Aug 7, 10:21 am, fred <fredantis...@free.fr> wrote:
> nos...@see.signature (Richard Maine) a =E9crit :
>
>
>
>
>
>
> No. :-)
> For several reasons:
>
> 1) I put one space char between each variable, not tab.


Fortran compilers may use one or more spaces between variables for
list-directed output, but I don't know of any that use tabs.

>
> 2) Beyond a fixed number of column (I don't remember which one),
> it jumps to the next line.
>
>
>
>
> Same answer ;-)
>
> PS: I use intel fortran compiler.


write (*,"(1000(1x,:,i0))") [(i,i=3D0,10)]

prints integers with one space between them. The format string puts
1000 integers on a line before going to the next line.





fred

2007-08-07, 7:10 pm

Beliavsky <beliavsky@aol.com> a écrit :

> write (*,"(1000(1x,:,i0))") [(i,i=0,10)]
>
> prints integers with one space between them. The format string puts
> 1000 integers on a line before going to the next line.

So... well, I'm convinced now.
Writing it in C is far much easier ! :-))

Cheers,

--
http://scipy.org/FredericPetit
dpb

2007-08-07, 7:10 pm

fred wrote:
> dpb <none@non.net> a écrit :
>
> With gfortran:
> At line 13 of file essai.f90
> Fortran runtime error: Nonnegative width required in format
> (G D A)
>
> Your answer (the use of write()) is exactly what I call "more
> complicated" (than in C) ;-)


Then use list directed formating and be even simpler.

I had forgotten that the zero-length field widths for other than integer
forms and character data are an extension (although I think maybe that
was an enhancement in F2003, I'm not sure???)

Either way, it's far simpler than the abomination that is printf in C... :)

imo, ymmv, $0.02, etc., etc., ..., of course

--
dpb

2007-08-07, 7:10 pm

fred wrote:
> Beliavsky <beliavsky@aol.com> a écrit :
>
> So... well, I'm convinced now.
> Writing it in C is far much easier ! :-))


For some appropriate definition of "easier"... :)

Very little of C formatting is really easier than Fortran other than
stream i/o (before F2003 standardized it, anyway) imo.

It is mostly simply a case of what is familiar to one vis a vis the
other and as noted earlier in the thread easily degenerates into
"language wars" and religious issues.

imo, ymmv, $0.02, etc., ...

--
dpb

2007-08-07, 7:10 pm

fred wrote:
> tholen@antispam.ham a écrit :
>
> Because with F90, I'm still embarrassed with F77 features.
> No more, no less.
>
> But I repeat, it may be due to my lack of F90 knowledge.


Then one could always read the language reference manual and
programmers' guide accompanying your compiler and there are regular
threads asking for (and receiving) recommendations for appropriate texts
for given purposes and levels of entering expertise.

Investing in some time and learning might be far more productive than
casting stones at an unknown target w/ preconceived notions showing...

imo, ymmv, $0.02, etc., ...

--
Richard Maine

2007-08-07, 7:10 pm

fred <fredantispam@free.fr> wrote:

> nospam@see.signature (Richard Maine) a écrit :
>
> No. :-)
> For several reasons:
>
> 1) I put one space char between each variable, not tab.
>
> 2) Beyond a fixed number of column (I don't remember which one),
> it jumps to the next line.


I was talking about being "equivalent", which is to say having
comparable functionality - not matching character per character, which
is a completely different thing. I wouldn't expect different C compilers
to do that, at least for the real variable output.

As a matter of showing you how to do something simple and useful in
Fortran, I was interested in explaining; that's something I do. As an
artifical challenge and part of a language flame war, I am not
interested and will not participate. That's what I'm seeing here now.
Bye.

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

2007-08-07, 7:10 pm

nospam@see.signature (Richard Maine) a écrit :

> I was talking about being "equivalent", which is to say having
> comparable functionality - not matching character per character, which
> is a completely different thing. I wouldn't expect different C compilers
> to do that, at least for the real variable output.
>
> As a matter of showing you how to do something simple and useful in
> Fortran, I was interested in explaining;

I thank you for that.

> that's something I do. As an
> artifical challenge and part of a language flame war, I am not
> interested and will not participate. That's what I'm seeing here now.
> Bye.


Sorry if I have been misunderstood.
I certainly don't want to trigger a flamewar or whatsoever.
I recall I put a lot of smileys.

I only ask (the questions above) because these are the issue I often get
with fortran. No more, no less. So I ask because I really want to know
(and a little kidding, I have to admit ;-)


Cheers,

--
http://scipy.org/FredericPetit
David Thompson

2007-08-26, 4:27 am

On Tue, 07 Aug 2007 08:05:35 -0500, dpb <none@non.net> wrote:

> Richard Maine wrote:
[color=darkred]
[color=darkred]
[color=darkred]
> Certainly simplest, but perhaps closer literally (mostly depending on
> the C rules vis a vis Fortran for the G edit descriptor behavior) would be
>
> write(*,'(G D A)') x, a, s
>

C %d is decimal-int, so G I A and probably better G I0 A .
(Especially to avoid confusion with the Angelina Jolie movie. <G> )

> Certainly not much more complicated if use default field and precision
> as does fred's example...


- formerly david.thompson1 || achar(64) || worldnet.att.net
glen herrmannsfeldt

2007-08-27, 4:32 am

David Thompson wrote:

(snip)

(snip)
[color=darkred]
[color=darkred]
[color=darkred]
[color=darkred]
> C %d is decimal-int, so G I A and probably better G I0 A .
> (Especially to avoid confusion with the Angelina Jolie movie. <G> )


It seems that A without a length is allowed, as is I0.

C has the interesting feature that formats expand to fit the
needed size. (The width is a minimum.) It would be interesting
to have G0.6 in Fortran, but that hasn't been added yet. That is,
similar to I0, the width would expand as needed.

I have wondered about the use of %f in C on machines like some
Cray machines with 16 bit exponents. One might be surprised at
how large the value can become.

-- glen

robin

2007-08-29, 7:08 pm

"fred" <fredantispam@free.fr> wrote in message news:87bqdkwsu6.fsf@free.fr...
> tholen@antispam.ham a écrit :
>
> Another divantage:
>
> In C, printing _correctly_ to stdout is far much easier.


In C, printing rubbish is even easier!


Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com