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 backwards 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: <code>+</code>, <code>-</code>, <code>*</code>, <code>/</code>, <code>**</code>
- Relational operators: <code><</code>, <code><=</code>, <code>==</code>, <code>/=</code>, <code>></code>, <code>>=</code>
- Logical operators: <code>.not.</code>, <code>.and.</code>, <code>.or.</code>, <code>.eqv.</code>, <code>.neqv.</code>
- character concatenation: <code>//</code>
The assignment operator is denoted by the equal sign <code>=</code>. In addition, pointer assignment is denoted by <code>=></code>. Comments are denoted by the <code>!</code> symbol:
<syntaxhighlight lang= "fortran">
variable = expression ! assignment
pointer => target ! pointer assignment
</syntaxhighlight>
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.
