RE: compilation and unit nos. in g77

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxx> 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.
> 
 


[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux