ArticleslgStudy

science

F (programming language)

F (programming language) is a science topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand F (programming language) rather than just read about it. In short: F is a modular, compiled, numeric programming language, designed for scientific programming and scientific computation. F was developed as a modern Fortran, thus making it a subset of Fortran 95.

Key takeaways

  • F (programming language) belongs to science; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect F (programming language) to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of F (programming language) from memory before moving on to harder problems.

Reference excerpt

F is a modular, compiled, numeric programming language, designed for scientific programming and scientific computation. F was developed as a modern Fortran, thus making it a subset of Fortran 95. It combines both numerical and data abstraction features from these languages. F is also backward compatible with Fortran 77, allowing calls to Fortran 77 programs. F was implemented on top of compilers from NAG, Fujitsu, Salford Software and Absoft. It was later included in the g95 compiler.

Overview F is designed to be a minimal subset of Fortran, with only about one hundred intrinsic procedures. Language keywords and intrinsic function names are reserved keywords in F and no other names may take this exact form. F contains the same character set used in Fortran 90/95 with a limit of 132 characters. Reserved words are always written in lowercase. Any uppercase letter may appear in a character constant. Variable names do not have restriction and can include upper and lowercase characters.

Operators F supports many of the standard operators used in Fortran. The operators supported by F are:

Arithmetic operators: +, -, *, /, ** Relational operators: <, <=, ==, /=, >, >= Logical operators: .not., .and., .or., .eqv., .neqv. character concatenation: // The assignment operator is denoted by the equal sign =. In addition, pointer assignment is denoted by =>. Comments are denoted by the ! symbol:

Data types Similar to Fortran, the type specification is made up of a type, a list of attributes for the declared variables, and the variable list. F provides the same types as Fortran, except that double precision floating point variables must be declared as real with a kind with a kind parameter:

F does not have intrinsic support for object-oriented programming, but it does allow for records:

Variable declarations are followed by an attribute list. The attributes allowed are parameter, public, private, allocatable, dimension, intent, optional, pointer, save and target. The attribute list is followed by ::, which is part of the syntax. F also allows for optional initialization in the list of objects. All items in a list will have the same attributes in a given type declaration statement. In addition, declarations are attribute oriented instead of entity oriented.

Statement and control flow F supports 3 statements for control flow: if, a basic conditional, case, a switch statement, and do, a conditional while loop. The return, stop, cycle, and exit statements from Fortran may be used to break control flow.

F places a heavy emphasis on modular programming.

Placing procedures outside of a module is prohibited. F supports most of the functions and subroutines found in the Fortran 95 standard library. All functions in F are external by default and require a result clause that returns the value of a function. F supports recursion. All of the intrinsic procedures found in Fortran 95 may be used in F, with the exceptions of achar, iachar, lge, lgt, lle, llt, transfer, dble, dim, dprod, and mod.

References

Bibliography Walter S. Brainerd, Charles H. Goldberg, and Jeanne C. Adams: "Programmer's Guide to F", Unicomp, 1996. Gehrke, Wihelm (1997-05-30). The F Language Guide. Springer. ISBN 978-3-540-76165-5. Robin A. Vowels: "Algorithms and Data Structures in F and Fortran", Unicomp. Loren Meissner: "Essential Fortran 90 & 95", Unicomp, 1997.

External links F Programming Language Homepage Archived 2015-01-09 at the Wayback Machine g95 compiler Archived 2013-06-05 at the Wayback Machine

Worked examples

Example 1 — a first encounter with F (programming language)

Start with the simplest possible case. Write down what F (programming language) claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In science, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to F (programming language) before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about F (programming language) ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of F (programming language)

In research
F (programming language) appears in science research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses F (programming language) in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
F (programming language) is common in secondary-school and first-year university syllabi. It links to neighbouring topics Fortran programming language family, Programming languages, so understanding it makes those chapters shorter.
In everyday life
Look for F (programming language) outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.
Ask Teacher Smith questions about this articleOpens your AI tutor with a question about “F (programming language)” →

How to study F (programming language) in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what F (programming language) means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain F (programming language) out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is F (programming language) in simple terms?

F is a modular, compiled, numeric programming language, designed for scientific programming and scientific computation. F was developed as a modern Fortran, thus making it a subset of Fortran 95.

Why does F (programming language) matter?

Because it connects several science ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study F (programming language)?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on F (programming language).

Tags

  • Fortran programming language family
  • Programming languages

Keep exploring