REAL Output: The F Descriptor

The Fw.d descriptor is for REAL output. The general form is:

rFw.d

The meaning of r, w and d are:

Examples

Let us look at the following example. There are two REAL variables a and b with values 123.345 and -123.345, respectively. In the following table, the WRITE statements are shown in the left and their corresponding output, all using five positions, are shown in the right.

Consider the following example. The WRITE statement has three REAL variables and consequently the format must also have three F edit descriptors, one for each variable.

REAL :: a = 12.34, b = -0.945, c = 100.0

WRITE(*,"(3F6.2)")  a, b, c
The edit descriptor is 3F6.2 and the format is equivalent to (F6.2,F6.2,F6.2) because the repetition indicator is 3. Therefore, each of these three REAL variables is printed with F6.2. Based on the discussion earlier, the result is the following: