Presentation is loading. Please wait.

Presentation is loading. Please wait.

Computer Programming - Key Concepts and Terms Computer Program – A computer program is a set of instructions for computer, arranged in logical order, using.

Similar presentations


Presentation on theme: "Computer Programming - Key Concepts and Terms Computer Program – A computer program is a set of instructions for computer, arranged in logical order, using."— Presentation transcript:

1 Computer Programming - Key Concepts and Terms Computer Program – A computer program is a set of instructions for computer, arranged in logical order, using a programming language, for doing something useful. High Level Languages - These are programming languages that are Application/ Usage oriented. This means there are languages that are suitable for a particular class of applications. Some of the High Level Languages available are FORTRAN, BASIC, COBOL, Pascal, C, C++, Java, Python etc. Compiler – This software creates a Machine Language Program using a High Level Language program (FORTRAN). This Machine Language Program, called Executable (.EXE) program, is what actually executes on computer. Compilation - The process of translation of a program from High Level Language to Machine Language is called as Compilation.

2 Computer Programming - Key Concepts and Terms contd. Executable Statements – These are instructions for Computer, used during program execution, for performing specified tasks. Some of the Executable Statements are READ, WRITE, STOP, GOTO, IF etc. Nonexecutable Statements – These are instructions for Compiler, used during Compilation process. Some of the Non Executable Statements are END, REAL, CHARACTER, DIMENSION, FORMAT etc. Types of Errors - There are three types of errors Syntax Errors - These are grammatical errors. These errors are reported by compiler at the time of compilation. A program which has Syntax errors will not compile. Logical Errors - These errors occur due to faulty logic. It is not possible for compiler to point out Logical Errors Runtime Errors - These errors occur at the time of execution of program, for particular data values. Flowchart - This is graphical representation of a program. Flowchart is used as a guideline for programming. Flowchart is language independent; this means that same flowchart can be used for FORTRAN/ C/ BASIC … programs.

3 FORTRAN Programming – Introduction Installing FORTRAN IDE on your computer This task is required to be performed only if the computer system you will be using does not have FORTRAN IDE (Integrated Development Environment) software installed There are many softwares available for this purpose. I have used Force 2.0 IDE, which is free, and is freely downloadable from the internet. You can visit the Force Project web site at http://force.lepsch.com. You can download and install the latest version from the site.http://force.lepsch.com

4 Rules for Coding a FORTRAN Program While writing FORTRAN statements we must follow the rules of coding. These rules specify ‘what appears where’. Each line is assumed to contain 80 characters (referred to as Columns). Each line is divided into five distinct zones as described below.

5 Structure of a FORTRAN Program A FORTRAN program consists of one Main Program and zero or more subprograms. The Main program and the Subprograms are referred to as Program Modules or Program Units. The program execution always begins with the Main Program.

6 The Main Program begins with Program Header (optional). The Program Header, if any, is followed by required instructions (statements). The END statement is written as the last statement of Main Program. The Main program syntax PROGRAM prgname statements END


Download ppt "Computer Programming - Key Concepts and Terms Computer Program – A computer program is a set of instructions for computer, arranged in logical order, using."

Similar presentations


Ads by Google