Skip to main content

1.4) Points To Note About The First Fortran 95 Program


You will notice that the program starts with the word program followed by a name of the program (a name you choose) and the program ends with the ‘end program’ followed by the same name again. The two lines between these are the program commands. The second line starts with an ! which tells Fortran to ignore this line. That is why is says comments on that line. Any time you want to include comments you just put an ‘!’ and the rest of that line will be ignored.
The line 3 is the instruction print *,. This means print what follows to the screen (not the printer!). Don’t worry about the *, that comes after the print statement for now, just include it. The program will print what is between the quotes (i.e. 'This is my first code running') to the screen when the program is run.