public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* Fortran
@ 2000-04-19 19:04 Demas Ami
  2000-04-21  5:54 ` Fortran Toon Moene
  0 siblings, 1 reply; 10+ messages in thread
From: Demas Ami @ 2000-04-19 19:04 UTC (permalink / raw)
  To: gcc

Dear Sir/Madam,

I'm new to linux. I tried to compile my fortran program using G77 and it
works. But when I run
the program, after I type the input file and the designated output file,
the program got aborted.
I already put the input file in the same directory as the program. My
program work in windows
using MS compiler.

I use the following sintax for open file:

open(unit=5, file='inputfile', status='new')
open(unit=6, file='output', status='unknown')

read(5,*)n ...........(something like this)

write(6,*) hf  ........(something like this)

Is it impossible to write program in linux(g77) using the input file
and writing the output into fiel

Thank you for your kind attention and cooperation.

Best regards,

Suwito

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Fortran
  2000-04-19 19:04 Fortran Demas Ami
@ 2000-04-21  5:54 ` Toon Moene
  0 siblings, 0 replies; 10+ messages in thread
From: Toon Moene @ 2000-04-21  5:54 UTC (permalink / raw)
  To: Demas Ami; +Cc: gcc

Demas Ami wrote:

> I'm new to linux. I tried to compile my fortran program using G77 and it
> works. But when I run
> the program, after I type the input file and the designated output file,
> the program got aborted.
> I already put the input file in the same directory as the program. My
> program work in windows
> using MS compiler.
> 
> I use the following sintax for open file:
> 
> open(unit=5, file='inputfile', status='new')
> open(unit=6, file='output', status='unknown')
> 
> read(5,*)n ...........(something like this)
> 
> write(6,*) hf  ........(something like this)
> 
> Is it impossible to write program in linux(g77) using the input file
> and writing the output into fiel

Well, as far as you showed us your program, this is all standard fortran
77, so it should work when compiled with g77.

However, there's one problem with it:

You read from a file for which you stated on the open statement that it
doesn't exist yet: "open(...,status='new')

That's only possible if you first write to the file on unit 5, before
reading from it (you also have to rewind before reading).

The snippets you showed are not conclusive in this regard, but if you
only intend to read from unit 5, you cannot open it with "status='new'".

If you do, you'll get the following error from the run time library:

open: 'new' file exists
apparent state: unit 5 named infile

Cheers,

-- 
Toon Moene - mailto:toon@moene.indiv.nluug.nl - phoneto: +31 346 214290
Saturnushof 14, 3738 XG  Maartensdijk, The Netherlands
GNU Fortran 77: http://gcc.gnu.org/onlinedocs/g77_news.html
GNU Fortran 95: http://xena.eas.asu.edu/~andy (under construction)

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Fortran
  2004-10-20 13:26     ` Fortran Tolga Dalman
  2004-10-20 13:46       ` Fortran Robert Dewar
@ 2004-10-21 12:58       ` Clifford Wolf
  1 sibling, 0 replies; 10+ messages in thread
From: Clifford Wolf @ 2004-10-21 12:58 UTC (permalink / raw)
  To: Tolga Dalman; +Cc: Robert Dewar, gcc

On Wed, Oct 20, 2004 at 01:20:45PM +0200, Tolga Dalman wrote:
> > Not all the world speaks english :-)
> 
> here i totally agree, and i want to repeat my argument: as much documentation as
> possible should translated. 

I didn't speak a single word english as I started programming with BASIC on
the C-64 with the age of 8.

I never had a problem with using "if" instead of the german word "wenn" in
my programms, but having a german handbook helped a lot..

(nowdays I don't care much about german documentation, but that is a
different story ;-)

yours,
 - clifford

-- 
/"\  ASCII Ribbon Campaign - against html email
\ /                        - against microsoft office attachments
 X                         - against text above fullquote below
/ \                        - against lines longer than 79 characters
 
Logizomechanophobia - Fear of computers. (www.phobialist.com)
 

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Fortran
  2004-10-20 14:12         ` Fortran Tolga Dalman
@ 2004-10-20 17:01           ` Robert Dewar
  0 siblings, 0 replies; 10+ messages in thread
From: Robert Dewar @ 2004-10-20 17:01 UTC (permalink / raw)
  To: Tolga Dalman; +Cc: gcc

Tolga Dalman wrote:
> On Wed, 20 Oct 2004 08:46:25 -0400 Robert Dewar <dewar@gnat.com> wrote:

> i'd love to see more productive ideas on increasing the heterogenity of
> software.
> nevertheless, i think now you misunderstood me: i never wanted to reject
> anything, since i am in no position to do something like that. rather, i
> wanted to discuss the idea of translating programming languages. 

OK, fair enough. For sure, it is the case that efforts at translating
keywords have not caught on in mainstream use at all. Even translating
error messages is not common, and most professional programmers tend
to read english pretty well anyway.

The open question is whether it may be helpful to students learning
a language for the first time. I don't have an opinion on that. I
simply don't know, and there is no point in guessing when in fact I
suspect there are plenty of people who do have experience they can
relate (probably they are not readers of this list, where this
topic is only marginally on topic :-)
> 
> best regards,
> Tolga Dalman


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Fortran
  2004-10-20 13:46       ` Fortran Robert Dewar
@ 2004-10-20 14:12         ` Tolga Dalman
  2004-10-20 17:01           ` Fortran Robert Dewar
  0 siblings, 1 reply; 10+ messages in thread
From: Tolga Dalman @ 2004-10-20 14:12 UTC (permalink / raw)
  To: Robert Dewar; +Cc: gcc

On Wed, 20 Oct 2004 08:46:25 -0400 Robert Dewar <dewar@gnat.com> wrote:

> Tolga Dalman wrote:
> 
> >>So in fact to many people, it makes sense, especially say for
> >>initial student introduction, to do these kind of translations.
> > 
> > 
> > i do not agree to you: especially initial student introduction should aim
> > towards developing in a common style. that is, every CS student in the world
> > should learn the same thing, and (s)he should be able to find tons of
> > information from the internet. 
> > i regard programming language keywords rather as symbols than words, that
> > could be ever translated. but that's just my view ...
> 
> If you do not agree with me, you are saying that it is not the case
> that this makes sense to many people. I think that is just plainly
> wrong, there have been lots of efforts at such translation.

my point is, it leeds to nowhere, especially in a open-source community, where
there is a special demand on common agreements. so, i believe, a piece of
software shouldn't contain keywords like 'eger' or variable names like 'aaa'. 

> If you are disgreeing with the idea, as seems to be the case, then
> you did not read my message clearly. I never gave my own opinion
> on the subject! you don't know whether you agree with me on the
> issue of translation, because I did not give my opinion, and do
> not care to.

if that was the case, then i apologize. 

> My point was that this is a perfectly reasonable thing to
> pursue from a technical point of view if someone thinks
> it is interesting to do, and I think it is more useful on
> this list to be inclusive of all kinds of different
> approaches and projects than to reject ideas you don't
> like :-)

i'd love to see more productive ideas on increasing the heterogenity of
software.
nevertheless, i think now you misunderstood me: i never wanted to reject
anything, since i am in no position to do something like that. rather, i
wanted to discuss the idea of translating programming languages. 

best regards,
Tolga Dalman

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Fortran
  2004-10-20 13:26     ` Fortran Tolga Dalman
@ 2004-10-20 13:46       ` Robert Dewar
  2004-10-20 14:12         ` Fortran Tolga Dalman
  2004-10-21 12:58       ` Fortran Clifford Wolf
  1 sibling, 1 reply; 10+ messages in thread
From: Robert Dewar @ 2004-10-20 13:46 UTC (permalink / raw)
  To: Tolga Dalman; +Cc: gcc

Tolga Dalman wrote:

>>So in fact to many people, it makes sense, especially say for
>>initial student introduction, to do these kind of translations.
> 
> 
> i do not agree to you: especially initial student introduction should aim
> towards developing in a common style. that is, every CS student in the world
> should learn the same thing, and (s)he should be able to find tons of
> information from the internet. 
> i regard programming language keywords rather as symbols than words, that
> could be ever translated. but that's just my view ...

If you do not agree with me, you are saying that it is not the case
that this makes sense to many people. I think that is just plainly
wrong, there have been lots of efforts at such translation.

If you are disgreeing with the idea, as seems to be the case, then
you did not read my message clearly. I never gave my own opinion
on the subject! you don't know whether you agree with me on the
issue of translation, because I did not give my opinion, and do
not care to.

My point was that this is a perfectly reasonable thing to
pursue from a technical point of view if someone thinks
it is interesting to do, and I think it is more useful on
this list to be inclusive of all kinds of different
approaches and projects than to reject ideas you don't
like :-)

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Fortran
  2004-10-20 13:19   ` Fortran Robert Dewar
@ 2004-10-20 13:26     ` Tolga Dalman
  2004-10-20 13:46       ` Fortran Robert Dewar
  2004-10-21 12:58       ` Fortran Clifford Wolf
  0 siblings, 2 replies; 10+ messages in thread
From: Tolga Dalman @ 2004-10-20 13:26 UTC (permalink / raw)
  To: Robert Dewar; +Cc: gcc

On Wed, 20 Oct 2004 06:41:56 -0400 Robert Dewar <dewar@gnat.com> wrote:

> Tolga Dalman wrote:
> 
> > i believe, that it is possible to implement quite easily, but why would you
> > do that? although the semantics of fortran wouldn't be affected, many
> > developers could be confused by different syntax (= language) of the same
> > language. so, IMHO, the translation of a programming language does not make
> > much sense, but i believe, documentation translations are highly welcome!
> > 
> There is a long history of versions of standard languages with
> keywords translated into various languages. Translating the
> keywords is of course easy enough. What is harder in some cases
> is when the structure of a compound statement (such as if else)
> does not match the native language.

none of those translated languages have survived, AFAIK. 

> So in fact to many people, it makes sense, especially say for
> initial student introduction, to do these kind of translations.

i do not agree to you: especially initial student introduction should aim
towards developing in a common style. that is, every CS student in the world
should learn the same thing, and (s)he should be able to find tons of
information from the internet. 
i regard programming language keywords rather as symbols than words, that
could be ever translated. but that's just my view ...

> Not all the world speaks english :-)

here i totally agree, and i want to repeat my argument: as much documentation as
possible should translated. 

regards, 
Tolga Dalman

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Fortran
  2004-10-20 11:20 ` Fortran Tolga Dalman
@ 2004-10-20 13:19   ` Robert Dewar
  2004-10-20 13:26     ` Fortran Tolga Dalman
  0 siblings, 1 reply; 10+ messages in thread
From: Robert Dewar @ 2004-10-20 13:19 UTC (permalink / raw)
  To: Tolga Dalman; +Cc: gcc

Tolga Dalman wrote:

> i believe, that it is possible to implement quite easily, but why would you do
> that? although the semantics of fortran wouldn't be affected, many developers
> could be confused by different syntax (= language) of the same language.
> so, IMHO, the translation of a programming language does not make much sense,
> but i believe, documentation translations are highly welcome!
> 
> best regards, 
> Tolga Dalman

There is a long history of versions of standard languages with
keywords translated into various languages. Translating the
keywords is of course easy enough. What is harder in some cases
is when the structure of a compound statement (such as if else)
does not match the native language.

So in fact to many people, it makes sense, especially say for
initial student introduction, to do these kind of translations.
Not all the world speaks english :-)


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Fortran
  2004-10-20 10:53 Fortran Faruk Diblen
@ 2004-10-20 11:20 ` Tolga Dalman
  2004-10-20 13:19   ` Fortran Robert Dewar
  0 siblings, 1 reply; 10+ messages in thread
From: Tolga Dalman @ 2004-10-20 11:20 UTC (permalink / raw)
  To: gcc

hi,

On Wed, 20 Oct 2004 10:21:02 +0300 "Faruk Diblen" <fd21268@mail2.gantep.edu.tr>
wrote:

> I m from Turkey.I am studying at University of Gaziantep Physics Engineering 
> Department.I want to translate fortran to Turkish.Ýs it possible?I meant ý 
> want to use "eger" instead of "if" which means "if" in Turkish.Can i do this?
> Ýf i do this does fortran work?Any limitation to do this?Ýf i can do that can 
> you help me?

i believe, that it is possible to implement quite easily, but why would you do
that? although the semantics of fortran wouldn't be affected, many developers
could be confused by different syntax (= language) of the same language.
so, IMHO, the translation of a programming language does not make much sense,
but i believe, documentation translations are highly welcome!

best regards, 
Tolga Dalman

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Fortran
@ 2004-10-20 10:53 Faruk Diblen
  2004-10-20 11:20 ` Fortran Tolga Dalman
  0 siblings, 1 reply; 10+ messages in thread
From: Faruk Diblen @ 2004-10-20 10:53 UTC (permalink / raw)
  To: gcc



 Hi

I m from Turkey.I am studying at University of Gaziantep Physics Engineering 
Department.I want to translate fortran to Turkish.İs it possible?I meant ı 
want to use "eger" instead of "if" which means "if" in Turkish.Can i do this?
İf i do this does fortran work?Any limitation to do this?İf i can do that can 
you help me?

Thank....:)


Faruk Diblen
University Of Gaziantep
Physics Engineering Department


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2004-10-21 10:28 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-04-19 19:04 Fortran Demas Ami
2000-04-21  5:54 ` Fortran Toon Moene
2004-10-20 10:53 Fortran Faruk Diblen
2004-10-20 11:20 ` Fortran Tolga Dalman
2004-10-20 13:19   ` Fortran Robert Dewar
2004-10-20 13:26     ` Fortran Tolga Dalman
2004-10-20 13:46       ` Fortran Robert Dewar
2004-10-20 14:12         ` Fortran Tolga Dalman
2004-10-20 17:01           ` Fortran Robert Dewar
2004-10-21 12:58       ` Fortran Clifford Wolf

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).