Fortran Character Set - Fortran

The Fortran character set consists of 26 uppercase and 26 lowercase letters (alphabetic characters), the numbers 0 through 9 (digits), and special characters. This manual refers to letters (uppercase and lowercase) together with the underscore (_) as extended alphabetic characters. The extendedalphabetic characters together with the digits are also referred to as alphanumeric characters. The complete character set is

Letters: A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
a b c d e f g h i j k l m n o p q r s t u v w x y z

Digits: 0 1 2 3 4 5 6 7 8 9

Special Characters:
= Equal
+ Plus
- Minus
* Asterisk
/ Slash
( Left parenthesis
) Right parenthesis
, Comma
. Decimal point
$ Currency symbol
' Apostrophe
: Colon
! Exclamation point
_ Underscore
" Quotation mark

Lowercase alphabetic characters, the exclamation point (!), the underscore (_), and the double quote (") are extensions to Fortran 77. Digits are interpreted in base 10. A special character can serve as an operator, a part of a character constant, a part of a numeric constant, or some other function

Blank Characters
Use blank characters freely to improve the appearance and readability of Fortran statements. They have no significance in Fortran statements, except

  • in character constants
  • for H and character editing in format specifications
  • in Hollerith constants
  • to signify an initial line when used in column 6 of source line
  • when counting the total number of characters allowed in any one Statement

These special considerations are discussed in detail in later sections.

Escape Sequences

Table lists escape sequences for representing non-graphic characters and for compatibility with the C programming language.

Table : C Escape Sequences

C Escape SequencesC Escape Sequences

The compiler treats the backslash character as the beginning of an escape sequence by default. To use backslash as a normal character, compile the program with the –backslash option.

All rights reserved © 2020 Wisdom IT Services India Pvt. Ltd Protection Status

Fortran Topics