Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
Hi there. I hope there is someone out there familiar with Fortran IV. Many years ago I was writing Fortran IV programs, month after months. I probably wrote tens of thousand statements and of course everything compiled. Since then I went through C, Pascal, C++, C# (lately) and Visual Fox Pro, and now I need Fortran again. My environment is: Windows 7==>VirtualBox==>Ubuntu==>GFortran (Fortran 77). Needless to say I forgot my Fortran. Now I have to recover what I've lost. Anyhow, I began by copying a code for Fortran IV from this website to Vim editor. I then ran Gfortran in Ubuntu and got an error message that one FORMAT statement was incorrect.
Thank you guys. Yes evo2, I recall now, the asterisk in the 6th column should do the trick. I will be able to try it in a few hours. I thought too, Vim should have sensed Fortran. It really does not. I could not even force it to display column numbers somewhere. There must be a special editor for the language in Ubuntu. - Alex
John_W, as far as I remember you have never given me a suggestion that worked. More than that, they all resulted in wasted efforts and confusion. When I tried to install gcc33-fortran and gcc-34-fortran as you advised I got an error: the package could not be found. It happened with both installation attempts.
As evo2 said, you aren't following the spacing rules, as has been pointed out multiple times.
You need TWO spaces after the 601 before FORMAT (or if you don't have a space before 601, then you need three spaces between 601 and FORMAT). The F in FORMAT needs to start on column 7, your examples have it on column 5.
The $ for the line wrap (it can be any character) needs to be in column 6.
Fortran 77 is not a free-format language, but has a very strict set of rules for how the source code should be formatted. The most important rules are the column position rules:
Col. 1 : Blank, or a "c" or "*" for comments
Col. 1-5 : Statement label (optional)
Col. 6 : Continuation of previous line (optional)
Col. 7-72 : Statements
Col. 73-80: Sequence number (optional, rarely used today)
Most lines in a Fortran 77 program starts with 6 blanks and ends before column 72, i.e. only the statement field is used.
Last edited by suicidaleggroll; 04-02-2014 at 09:22 PM.
Thank you guys. I will try your suggestions in a few hours, at the end of the day since I am at work now. Please keep it in mind that I copied this code from a website which advertises "Fortran Samples." It is not my creation. I am trying to relearn the language in a hurry. Thanks, - Alex