|
|
Help with fortran
|
|
|
|
Fresh-Faced Recruit
Join Date: Jan 2004
Location: Helsinki, Finnland
Status:
Offline
|
|
Hello everyone
I need some help with fortran because I need to code some stuff for a school course.
I installed g77 with fink and compiled a .f file in terminal and got a .out file, how are these run. In basics my guestion is how to run a program I have written in .f file in os x.
Other thing is how the g77 interacts with xcode, I can edit codes there, but can I compile if I have installed g77.
Hopefully you undestant my questions and somebody can help me
|
TumppiH
|
|
|
|
|
|
|
|
Baninated
Join Date: Dec 2004
Location: Illinois might be cold and flat, but at least it's ugly.
Status:
Offline
|
|
God, who uses Fortran? I thought Fortran was only really good for mathematical operations.
You have to compile it with a compiler. Just like with C or PASCAL. You just can't run it.
You run it then you get output. That's it.
|
|
|
|
|
|
|
|
|
Fresh-Faced Recruit
Join Date: Jan 2004
Location: Helsinki, Finnland
Status:
Offline
|
|
Originally Posted by budster101
God, who uses Fortran? I thought Fortran was only really good for mathematical operations.
You have to compile it with a compiler. Just like with C or PASCAL. You just can't run it.
Well apparently the professor who keeps the class likes to use fortran for calculations, we are doing mathematical stuff, so I guess its okay.
I tought that the g77 is a compiler, so do I need some additional software?
Thanks for help
|
TumppiH
|
|
|
|
|
|
|
|
Baninated
Join Date: Dec 2004
Location: Illinois might be cold and flat, but at least it's ugly.
Status:
Offline
|
|
Originally Posted by TumppiH
Well apparently the professor who keeps the class likes to use fortran for calculations, we are doing mathematical stuff, so I guess its okay.
I tought that the g77 is a compiler, so do I need some additional software?
Thanks for help
I'm not familiar unfortunately with compiling Fortran on a Mac, but it's cool that your professor is using it to demonstrate the values in Fortran as a mathematical tool.
I did this stuff in High School which was..... too long ago and on a <cough>terminal hooked up to a mainfram</cough>
|
|
|
|
|
|
|
|
|
Clinically Insane
Join Date: Oct 2001
Location: San Diego, CA, USA
Status:
Offline
|
|
I don't do Fortran, but I'm pretty sure g77 is a compiler. Did you try running the object file?
|
Chuck
___
"Instead of either 'multi-talented' or 'multitalented' use 'bisexual'."
|
|
|
|
|
|
|
|
Fresh-Faced Recruit
Join Date: Jan 2004
Location: Helsinki, Finnland
Status:
Offline
|
|
Originally Posted by Chuckit
I don't do Fortran, but I'm pretty sure g77 is a compiler. Did you try running the object file?
okay now I got it to work, to run the .out file you have to put ./ in front of the file name if the file is in the current directory, otherwise the whole path.
For example ./foo.out
Thanks for help, now it seems to be working.
|
TumppiH
|
|
|
|
|
|
|
|
Addicted to MacNN
Join Date: Oct 2001
Location: Yokohama, Japan
Status:
Offline
|
|
That's not specific to what you're doing. You need to explicity state the path for any executable that isn't in your $PATH.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Forum Rules
|
|
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
|
HTML code is Off
|
|
|
|
|
|
|
|
|
|
|
|