Next: , Up: Naming and argument-passing conventions

7.4.1 Naming conventions

According the Fortran standard, valid Fortran names consist of a letter between A to Z, a to z, digits 0, 1 to 9 and underscores (_) with the restriction that names may only start with a letter. As vendor extension, the dollar sign ($) is additionally permitted with the option -fdollar-ok, but not as first character and only if the target system supports it.

By default, the procedure name is the lower-cased Fortran name with an appended underscore (_); using -fno-underscoring no underscore is appended while -fsecond-underscore appends two underscores. Depending on the target system and the calling convention, the procedure might be additionally dressed; for instance, on 32bit Windows with stdcall, an at-sign @ followed by an integer number is appended. For the changing the calling convention, see see GNU Fortran Compiler Directives.

For common blocks, the same convention is used, i.e. by default an underscore is appended to the lower-cased Fortran name. Blank commons have the name __BLNK__.

For procedures and variables declared in the specification space of a module, the name is formed by __, followed by the lower-cased module name, _MOD_, and the lower-cased Fortran name. Note that no underscore is appended.