PM me with details $$
2/26/2007 11:57:48 AM
FORTRAN 112 .. the basics !!!
2/26/2007 11:59:32 AM
I'm a fortran TA, what do you need help with?
2/26/2007 12:23:27 PM
who the hell takes fortran? do people really still need to learn this language?
2/26/2007 12:50:51 PM
required for ME/AE
2/26/2007 1:09:42 PM
and for NE [Edited on February 26, 2007 at 1:38 PM. Reason : yo]
2/26/2007 1:37:58 PM
Dude...ask the TA's they'll help you out all the way. Sometimes they just give you the code. I mean the TA that I was working with, we pretty much wrote the code on the board while the students are telling what they think they should write down and we just correct them. But the point here is, go see a TA. They will help you.
2/26/2007 3:18:00 PM
^^^^ It's still the best thing for raw number crunching.
2/26/2007 3:20:11 PM
Not to mention the sheer number of existing fortran codes. I thought it was a waste to learn it too, but that's the main language for most of the simulation code at my company-- and when I worked at NASA. One of my on-the-side task now is updating a f77 code to 95 and bringing in some 2003 concepts. Sounds boring but intimately knowing a 60K line code your company depends on = job security.[Edited on February 26, 2007 at 3:33 PM. Reason : .]
2/26/2007 3:32:58 PM
i too am a TA. let me know what you need help with
2/26/2007 4:40:16 PM
2/27/2007 2:03:44 PM
^true true. Modules, Explicit/generic interfaces, module procedures, derived data types, even operator overloading. C++ people will know this as classes and it's methods. Fortran can typically give an *engineer* pretty much all the oo techniques he needs for complex simulations-- of course not always. it's just not taught in the class at State. Hell, we didn't even cover pointers.
3/1/2007 10:48:54 AM
excuse my ignorance, but what can Fortran do that C++ or Java can't? sounds to me that all Fortran has going for it is maintenance of legacy code.
3/2/2007 12:01:38 AM
Fortran is great for number calculations and processing (much faster and efficient than C++ or Java). Because of its age and syntax though, other languages have become more popular.
3/2/2007 10:20:06 PM
I have a friend taking Fortran using Fortran 90. How do you read in a text file, 5 items at a time, (3 ints, 2 double), if one of them is equal to something, then print out those 5 values on different lines?
3/3/2007 12:11:49 AM
majic
3/3/2007 3:30:32 AM
3/3/2007 3:45:17 AM
Darknight23, I'm not sure I entirely understand what you are trying to do... does the text file have like 5 columns of data and you want to read each value and print them out? I'm not sure what you mean by "if on of them is equal to something" but this is how you would go about reading from a file:OPEN (UNIT = 10, FILE = "filename", STATUS = "OLD", ACTION = "READ", IOSTAT = EOF)DO READ (10, *, IOSTAT = EOF) a, b, c, d, e IF (EOF /= 0) EXIT WRITE (*,*) a, b, c, d, eEND DOWhere a, b, c, d, and e are the 5 values you want to read, EOF is an integer, and you put the name of the file in the "filename" part.[Edited on March 3, 2007 at 9:33 AM. Reason : it won't let me indent to make the code nested within the loop...]
3/3/2007 9:32:11 AM
fortran is definately better for raw number cruching than c++ or java.
3/3/2007 10:31:39 AM
^^ probably should do a formatted read statement.50 FORMAT( ...)READ(10,50,IOSTAT=EOF)^^^^^well yes that's a big part of it. It's easier to interface legacy fortran with newer fortran codes than it is c++. You have to be careful and understand how each different language treats variables and stores them in memory when you are calling C from Fortran. Performance is the other issue. Fotran will outperform java any day for the simulations we run. Prove to me otherwise, like you say. C++ on the other hand can rival Fortran in speed for certain applications. My understanding about this is that it is only recently that this is true. I think the majority of people who still say fortran is faster than c++, are carrying around bias from years ago.No doubt, if I was to write a code from scratch I would use C++. But a lot of the older folks around here only know fortran so our main simulation codes will be stuck in Fortran indefinitely. Updating to Fortran 95 and using some 2003 concepts to improve it is fairly straight forward-- a little time consuming but straight forward. Changing over to C++ would be a nightmare. Remember all these folks tried that years ago with "f2c" -- wasn't good.Like I said recent changes to Fortran gives the engineer enough object based concepts to write good code for their application, and after all it's just a tool to us. If it gets the job done fast than it's good enough. Fortran is a tool for engineers to model physical process and run large simulations that's about it. A csc major has absolutely no reason to learn it, c++ is much much much better.[Edited on March 3, 2007 at 10:40 AM. Reason : .]
3/3/2007 10:39:53 AM
3/3/2007 11:08:34 AM
[Edited on March 3, 2007 at 4:09 PM. Reason : ]
3/3/2007 4:05:59 PM
hey i dont know anything about Fortran. and i know just enough Java to get into trouble. in embedded hardware design, the only thing i really use is C/C++so im just trying to flush the Fortran advocates out. Try to get them riled up.thanks for participating.
3/3/2007 4:09:09 PM
Oh, so you are a fag?
3/3/2007 10:58:40 PM
yeah, basicallybut thanks for schoolin me [Edited on March 4, 2007 at 3:29 AM. Reason : ]
3/4/2007 3:28:59 AM