Smooth Particle Applied Mechanics: The State of the Art

4.2: FORmula TRANslation Languages

4.2 FORmula TRANslation Languages

Students today have many choices of computer languages to use for implementing numerical algorithms. What are the issues that must be addressed in selecting a best language for their work? To answer this question we briefly consider relevant characteristics of the programming languages, language styles and more importantly, the ease with which mathematics and numerical methods can be translated into usable computer instructions.

A computer language consists of a collection of statement types and a grammar that restricts the ordering and actions implied by the statements. Each statement type is translated into specific computer instructions for assigning memory to variables and arrays, performing arithmetic operations, reading and writing files, and controlling the flow of the statements that are executed as a program runs. Each language has its own statement syntax and associated rules. The language must define variables, along with their type and precision, provide for operations on the variables, and govern the flow of the execution. The following examples illustrate the primary syntactical differences between the Fortran and C language statements. The C language name indicates only that its predecessors were the now defunct "A" and "B" languages. References, 1 and 2 for Fortran; 3 and 4 for C, are listed at the end of the Chapter. Many more can be found on the internet.

Fortran 77 Program
c Fortran statements begin in column 7.c Comment lines are indicated with a c or a C in column 1.c A Fortran rule is that a...

UNLIMITED FREE
ACCESS
TO THE WORLD'S BEST IDEAS

SUBMIT
Already a GlobalSpec user? Log in.

This is embarrasing...

An error occurred while processing the form. Please try again in a few minutes.

Customize Your GlobalSpec Experience

Category: Programming Languages
Finish!
Privacy Policy

This is embarrasing...

An error occurred while processing the form. Please try again in a few minutes.