public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* RE: compilation and unit nos. in g77
@ 2003-12-20 18:52 bud davis
  0 siblings, 0 replies; 3+ messages in thread
From: bud davis @ 2003-12-20 18:52 UTC (permalink / raw)
  To: jaogale; +Cc: gcc-help

g77 connects unit 5 to stdin and unit 6 to stdout.

    READ(5,*)A
    WRITE(6,*)'HELLO'

by default this will read and write to/from the console.

i am aware of no way to write directly to the printer,
but it is possible to send stdout to a printer 
like this:

     ./a.out |lpr

it is also possible to write output to a file
and then send that file to the printer.

you will find that the fortran carraige control 
are probably not understood by a unix
printer. a google search will provide several
solutions to this problem.

the syntax for invoking g77 is identical to gcc.

all compiler options are documented in the man
page and the info page.

the entire g77 manual is available with:

info g77

likewise a man page exists with a good summary.

man g77

since these may not be installed in your linux
system, try this link: 

http://gcc.gnu.org/onlinedocs/g77/

g77 is a very robust compiler and accepts F77 from
other F77 compilers with little source code change.  
please feel free to address any specific problems  
encountered to this list. 

best of luck in your endeavor,
--bud davis

--- jayant ogale <jaogale@yahoo.co.in> wrote: >  
> Hi,
> 
> I have some programs written in Professional Fortran
> [Dos Based], in Borland compiler.
> 
> I want to convert them for G77 [Linux based]
> compiler. Please let me know the following things.
> 
> 1] what are the default unit numbers for ?Console?
> and ?Printer? in G77? if there are non then give me
the syntex to refer to the console and printer in read
/ write statements.
> 
> 2] I know only one line compilation and linking
> command as $ g77 filename.for which creates
> executable file as a.out. But I would like to know
> the detailed compilation and linking commands with
> all possible switches. [I could not find them in man
> or info pages.].
> 
> bye,
> 
> Jayant Ogale.
> 
 

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

* Re: compilation and unit nos. in g77
  2003-12-19  7:49 jayant ogale
@ 2003-12-21 12:40 ` Toon Moene
  0 siblings, 0 replies; 3+ messages in thread
From: Toon Moene @ 2003-12-21 12:40 UTC (permalink / raw)
  To: jayant ogale; +Cc: gcc-help

jayant ogale wrote:

>>I have some programs written in Professional Fortran
>>[Dos Based], in Borland compiler.
>>
>>I want to convert them for G77 [Linux based]
>>compiler. Please let me know the following things.
>>
>>1] what are the default unit numbers for 'Console'
>>and 'Printer' in G77? if there are non then give me
> the syntex to refer to the console and printer in read
> / write statements.

There are no standard ways to address 'Printer' from Fortran (or g77).

Use READ(*, ...) to read from the console and WRITE(*, ...) to write
to it. There probably is some DOS command to have the output to the
console go to the printer.

>>2] I know only one line compilation and linking
>>command as $ g77 filename.for which creates
>>executable file as a.out. But I would like to know
>>the detailed compilation and linking commands with
>>all possible switches. [I could not find them in man
>>or info pages.].

You can read the online manual here:

http://gcc.gnu.org/onlinedocs/gcc-3.3.2/g77/

Hope this helps,

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

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

* compilation and unit nos. in g77
@ 2003-12-19  7:49 jayant ogale
  2003-12-21 12:40 ` Toon Moene
  0 siblings, 1 reply; 3+ messages in thread
From: jayant ogale @ 2003-12-19  7:49 UTC (permalink / raw)
  To: gcc-help

 --- jayant ogale <jaogale@yahoo.co.in> wrote: >  
> Hi,
> 
> I have some programs written in Professional Fortran
> [Dos Based], in Borland compiler.
> 
> I want to convert them for G77 [Linux based]
> compiler. Please let me know the following things.
> 
> 1] what are the default unit numbers for ‘Console’
> and ‘Printer’ in G77? if there are non then give me
the syntex to refer to the console and printer in read
/ write statements.
> 
> 2] I know only one line compilation and linking
> command as $ g77 filename.for which creates
> executable file as a.out. But I would like to know
> the detailed compilation and linking commands with
> all possible switches. [I could not find them in man
> or info pages.].
> 
> bye,
> 
> Jayant Ogale.
> 
> 
> Yahoo! India Mobile: Ringtones, Wallpapers, Picture
> Messages and more.Download now. 

________________________________________________________________________
Yahoo! India Mobile: Download the latest polyphonic ringtones.
Go to http://in.mobile.yahoo.com

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

end of thread, other threads:[~2003-12-21 12:40 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-12-20 18:52 compilation and unit nos. in g77 bud davis
  -- strict thread matches above, loose matches on Subject: below --
2003-12-19  7:49 jayant ogale
2003-12-21 12:40 ` 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).