anyone here know FORTRAN?

ChrisM

Well-Known Member
Joined
Mar 20, 2005
Location
Boone
I'm taking some classes at State and got into a FORTRAN class 2 weeks late and have been trying to get caught up, but this stuff is just not clicking. The binary number system starts making sense, but something with octal and hexadecimal representation of binary number and this book hardly explaining anything is not helping at all. I think if I can a grasp on just how they are getting this numbers to work I can get a hang on figuring everything else out. So, if anyone can shoot me in the right direction or another place/book that would be of some help I would greatly appreciate it. (I went to Borders to find a "FORTRAN book for dummies," but had no luck, nothing online either.)
Someone help me! :confused:

Chris
 
HAHAHAHAHA!
I remember this class from 5 years ago. I did fine at first, but then struggled a little as we got more and more into it. Then I started staying after class to finish my work and get the TA to help me on it, and really got the hang of it. I ended up with an A or a "pass" in there. Might have a book laying around somewhere, Ill check.
 
I started a little over 2 weeks into the class and that definitely doesn't help anything out. I'm going to go see what I can do on campus tomorrow, but for some reason I had some motivation to work on it today and got absolutely no where.
 
been 10 years..and no use...knew it once like a whiz, now no clue....::beer::
 
Hey, I found my book. Sending you a PM in a minute.
 
been 10 years..and no use...knew it once like a whiz, now no clue....::beer::

Yeah, some dude at Borders was saying that not that many people use it, just scientist and such. Anyways, he just thought it was odd they were teaching a whole class on just Fortran.
 
AFAIK its obsolete in use
 
holy fawking flashback. I had to take that as a freshman or sophomore in college, late 80s. I was in the MechE program, but still had to take this crap. I hated it and was totally clueless, so I bagged it. Of course it came back to haunt me come graduation time. The class had been cancelled, I think replaced with Pascal or something equally or more heinous. My advisor sent me to the dean, and we figured on some independent study doing CAD, on Pro/Engineer. If I didnt have Pro/E on my resume, I probably would still be planting shrubs and mowing lawns. Moral of the story: FORTRAN can lick my scrotum.
 
holy fawking flashback. I had to take that as a freshman or sophomore in college, late 80s. I was in the MechE program, but still had to take this crap. I hated it and was totally clueless, so I bagged it. Of course it came back to haunt me come graduation time. The class had been cancelled, I think replaced with Pascal or something equally or more heinous. My advisor sent me to the dean, and we figured on some independent study doing CAD, on Pro/Engineer. If I didnt have Pro/E on my resume, I probably would still be planting shrubs and mowing lawns. Moral of the story: FORTRAN can lick my scrotum.


hahaha, that is a good laugh i needed right there. I'm going in the mechanical program as well and wondered why am I taking this class, especially when I here from everyone is that hardly anyone uses it. I know I wouldn't use it, its :gay: as :poop:
 
just go to the lab, the class is/or was worthless for learning anything
I went 2 days, but I never missed a lab and I learned a bunch in there. Got an A in that class
 
Here's a nice linky:
http://www.emu8086.com/assembly_lan...ler_reference/numbering_systems_tutorial.html
Search Google for "non decimal numbering systems" and read up. It will click sooner or later.
Wow, Fortran. That was um, Spring '99 for me I believe. I wrote some crazy program to model a steam system for the final project. I lived in the Laundry Bldg for a few nights doing that.

That link is exactly what I needed. I guess I wasn't searching the right words. Appreciate it, it seems whoever wrote that knows how to actually "teach" it in steps to where it is understandable. This other book I have is, not so much.
 
Yeah, I don't know anybody that uses Frotran for anything. See what's happened is that the smart folks used Forttran and Pascal to write new "languages"... C, BASIC, etc... which havet hen either grown or used to write even newer ones... and that's what we use now. No more direct machine language... but it does mean you need a compiler etc.

So is your biggest problem right now just in the conversion between hexidecimal, binary, and decimal? If you Google around, there are several tutorials and onlines converters that will do it for you and explain the logic.

As painful as this is, I do actually deal with this binary/decimal/hex issue myself. It most commonly comes up if you need to write a script to ocntrol or communicate with external devices, e.g. through a parallel port or an I/O card.

for instance, right now for a lab I'm setting up, I need to be able to turn some LEDs on and off. I'm doing this by connecting them to the parallel port. The port has 8 output pins, which each have 2 states - on or off. Binary. When you send a value to the port (via script, I'm using VB), it gets changed to binary, and this dictates which pins a\become active.
For example, I send a "1", in binary this is 00000001. It turns on Pin 1. I send a 2 - 00000010 - thsi turns on pin 2, off pin 1 (and 3-7. Send a 3 - 00000011 - pins 1 AND 2 are now on. etc etc. So in the last example, my devices (LEDs) on lines 1 and 2 will turn on, and the others (3-8) will be off, etc etc.
If you Google "parallel port communication" you'll see what I mean.

painful to learn? Yes. Useful? Maybe, maybe not. But I can tell you this - being able to do this has won me many favors and beers over the last few years when lab mates needed to set up a lab and control devices, and didn't want pay big $$ to contract an engineer for it.
 
FWIW, FORTRAN is designed for high math. It is built to be turned into efficient machine code that is built to handle large number equations. If I remember correctly, there are even tricky methods of bit-slicing to be able to pass parts of very large numbers in equations to multiple processors in a super-computing environment.

It is the right tool for certain jobs. A regular joe is likely to see something built with calculations using fortran, but never use a program written in it.

A former manager of mine used to tell stories of having to write the re-entry calculations for the Apollo mission in Fortran. He'd have a most of the code pre-written, and just punch in the variables from telemetry as it would come through.

-- That said, I'd rather code Java.
J
 
The book I have on my shelf right now is "Understanding Fortran 77 with Structured Problem Solving" I haven't opened it since 1989. $10 and it's yours!
 
27 base 10 is equal to 11011 base 2

can someone explain why that is so?

Read my first link above it will help.

You "live" base 10 every day, so 27 makes sense to you. Each digit counts up 0 to 9 then you add 1 to the next position to the left and start over with 0 on the right. Binary (base 2) is the same way, except every time you add 1 to an exisiting 1 you have to add a position (which is another 1!) and start over.

base 2 / base 10

0001 / 1
0010 / 2
0011 / 3
0100 / 4
0101 / 5
0110 / 6
0111 / 7
1000 / 8

...and so on.

So in your example, the 1 on the far right counts as one. The 1 second from the right counts as two (in base 10). The third digit is empty but would count as a four (in base 10) if it had a 1 in it. The fourth digit counts as an eight (in base 10) and the leftmost counts as a 16 (again, in base 10).

So your 11011 in base 2 equals 16 + 8 + 0 + 2 + 1 = 27 in base 10.
 
there are 10 types of people in the world, those that get binary, and those that dont...

Damnit, that's my favorite joke. You beat me to it.
 
27 base 10 is equal to 11011 base 2

can someone explain why that is so?

I remember when I was in HS, we did thsi in a math class and I really struggled with it, then one day, POP, it clicked. I think it was when the teacher tried a different approach.
It's like this. The deal is, you have to have a fundamental understanding of what a number system "base" is. That's what this all comes down to... once you get that, you can do math in any system you want (decimal, hex, quad, octal...)
Think of it this way. The reason we use 10 is because, well, look at your hands. Once you've used all your fingers, what do you do? You need a way to account for more. We only have 10 mnumbers (inluding 0) to work with. So when you run out ,of them you just tack another one to teh front, and start over. It kind of "wraps around".
E.g., 10 = 1 whole set of numbers. now it you have a whole set and one more, that's 11. A whoel set plus 5, well that's 15.
5 whole sets, plus 7, that's 57. etc etc.
In Binary, you only have 2 numbers in your set, 0 and 1. Once you've used both of them, you have to tack on another one in front. So 11 = 1 complete set, + 1 more. (since 1 complete set = 2 digits, teh total is 3 (2+1).
1011 = 1 group of 1, 1 group of 2, 0 groups of 4, and 1 group of 8. 8+0+2+1 = 11.

Same logic with Hexidecimal. There are 16 numbers (0,1,2,3,4,5,6,7,8,9,A,B,C,D,E,F). So 1 complete group + 1 more = 11 hex, which is 16 (1 more than 15) in decimal.
I know don't know if that helps. Just imagien having only 2 fingers to work with, try and think about how you would count things.
 
Back
Top