Fortran 90 programming

It could, for example, print out their year of birth with a suitable message. The real variable type gives us 6 figure decimal precision. You have to make a judgement here.

Uploader: Mami
Date Added: 23 May 2016
File Size: 63.24 Mb
Operating Systems: Windows NT/2000/XP/2003/2003/7/8/10 MacOS 10/X
Downloads: 15977
Price: Free* [*Free Regsitration Required]





Plato is a "programming environment". Always use implicit none at the start of every program. Provided you have given your file the appropriate extension, Plato's editor will be able to check the syntax of the program, highlighting the various keywords that it knows about using a colour code to distinguish between the various elements of the language. If this doesn't seem enough — don't worry we'll progfamming back later on when we examine how to increase the number of digits of precision in Worksheet 5.

The example below has a maximum length of 10 characters allowed for a person's name — this might not always be enough! Double clicking on the message will take you to the line in the program where the fault occurs.

Click on the programmint button. You might include different types of variables, for example realintegerand character. Include input and output using read and print.

The program statements are executed sequentially. Aims By the end of this worksheet, you will be able to: Notice the inclusion of the line: You have to make a judgement here.

We may output several items at one time, provided they are separated by commas. Run your last program again. The purpose of this exercise is to show you the various kinds of errors you may encounter when programming.

We tell Plato which language we are using when we create our empty file and save it with a. Each error generates a message. The real variable type gives us 6 figure decimal precision. This worksheet is also available prograamming PDF format.

So far, we have only used real floating point numbers in our programs. It could, for example, print out their year of birth with a suitable message.

Within Plato, you can create and edit programs and get them to run.

Example of a Fortran 90 Program

Privacy and cookies policy. Plato's editor is special — it understands the syntax of various programming languages.

This worksheet makes use of several examples programs that are all available for download from this website. We can also specify that numbers are integer and character. Worksheet 1 - Basics. The following program has a number of errors.

The Basics

When the black output window opens right click on the Plato icon in the top left corner. In the bad old days of programming, declaration of variables was thought to be unnecessary and the old FORTRAN compilers used an implicit convention that integers have names starting with the letters in the range i — n, all the others being real.

It's up to you, just use your imagination. Program convertbelow, demonstrates their use. The compiler will report two error messages when it attempts to compile.

You will come across errors many times as a programmer, and it is helpful to have a strategy for how to deal with them. Time has shown that one of the commonest reasons for error in a program is the incorrect use of variables. Save a copy of your output in Word.

0 thoughts on “Fortran 90 programming”

Leave a Reply

Your email address will not be published. Required fields are marked *