public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* g77; compiling my first program
@ 2004-09-24 16:48 Xucaen
  2004-09-24 17:49 ` Muthukumar Ratty
  2004-09-24 19:02 ` Toon Moene
  0 siblings, 2 replies; 3+ messages in thread
From: Xucaen @ 2004-09-24 16:48 UTC (permalink / raw)
  To: gcc-help

Hi, I'm taking a class "Principals of Programming
Languages" and this week we learned Fortran. So,
I installed g77 (using apt-get) and typed in a
simple Fortran program.

       PROGRAM FOR1
       I = 2
       PRINT 10, I
10     FORMAT (1X, I5)
       END

I saved my source file as for1.  I don't know
what extension g77 expects. I then tried to
compile with g77 for1, but I got an error saying
the file was in the wrong format. Maybe I had my
columns mixed up? or maybe someother syntax
error, or maybe I didn't have the correct
extension on the filename? In any case I thought
I would get a more clear compile error. (I'm on a
different machine today and I don't have the
exact error message).

I looked thru the extensive documentation but
could find an example of a simple fortran program
and how to compile it using g77. Does anyone have
any tips or suggestions for me?

Thanks!

Jim





		
__________________________________
Do you Yahoo!?
Yahoo! Mail - 50x more storage than other providers!
http://promotions.yahoo.com/new_mail

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

* Re: g77; compiling my first program
  2004-09-24 16:48 g77; compiling my first program Xucaen
@ 2004-09-24 17:49 ` Muthukumar Ratty
  2004-09-24 19:02 ` Toon Moene
  1 sibling, 0 replies; 3+ messages in thread
From: Muthukumar Ratty @ 2004-09-24 17:49 UTC (permalink / raw)
  To: Xucaen; +Cc: gcc-help


Hi, I think this is not appropriate for this list.  Please use some
fortran mailing list for these kinda questions.

Thanks,
Muthu.



On Fri, 24 Sep 2004, Xucaen wrote:

> Hi, I'm taking a class "Principals of Programming
> Languages" and this week we learned Fortran. So,
> I installed g77 (using apt-get) and typed in a
> simple Fortran program.
>
>        PROGRAM FOR1
>        I = 2
>        PRINT 10, I
> 10     FORMAT (1X, I5)
>        END
>
> I saved my source file as for1.  I don't know
> what extension g77 expects. I then tried to
> compile with g77 for1, but I got an error saying
> the file was in the wrong format. Maybe I had my
> columns mixed up? or maybe someother syntax
> error, or maybe I didn't have the correct
> extension on the filename? In any case I thought
> I would get a more clear compile error. (I'm on a
> different machine today and I don't have the
> exact error message).
>
> I looked thru the extensive documentation but
> could find an example of a simple fortran program
> and how to compile it using g77. Does anyone have
> any tips or suggestions for me?
>
> Thanks!
>
> Jim
>
>
>
>
>
>
> __________________________________
> Do you Yahoo!?
> Yahoo! Mail - 50x more storage than other providers!
> http://promotions.yahoo.com/new_mail
>

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

* Re: g77; compiling my first program
  2004-09-24 16:48 g77; compiling my first program Xucaen
  2004-09-24 17:49 ` Muthukumar Ratty
@ 2004-09-24 19:02 ` Toon Moene
  1 sibling, 0 replies; 3+ messages in thread
From: Toon Moene @ 2004-09-24 19:02 UTC (permalink / raw)
  To: Xucaen; +Cc: gcc-help

Xucaen wrote:

> Hi, I'm taking a class "Principals of Programming
> Languages" and this week we learned Fortran. So,
> I installed g77 (using apt-get) and typed in a
> simple Fortran program.
> 
>        PROGRAM FOR1
>        I = 2
>        PRINT 10, I
> 10     FORMAT (1X, I5)
>        END
> 
> I saved my source file as for1. 

Use for1.f

I'll look at whether this actually is documented (it probably is, 
because files ending in .F get the (C-) preprocessor applied to them first).

Hope this helps,

-- 
Toon Moene - e-mail: toon@moene.indiv.nluug.nl - phone: +31 346 214290
Saturnushof 14, 3738 XG  Maartensdijk, The Netherlands
Maintainer, GNU Fortran 77: http://gcc.gnu.org/onlinedocs/g77_news.html
A maintainer of GNU Fortran 95: http://gcc.gnu.org/fortran/

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

end of thread, other threads:[~2004-09-24 19:02 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-09-24 16:48 g77; compiling my first program Xucaen
2004-09-24 17:49 ` Muthukumar Ratty
2004-09-24 19:02 ` Toon Moene

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).