Current location - Plastic Surgery and Aesthetics Network - Plastic surgery and medical aesthetics - What does it mean that fortran real number data formatting needs e, f, d and g editors for input and output?
What does it mean that fortran real number data formatting needs e, f, d and g editors for input and output?
Input does not need to be formatted, but output does.

The control characters of print format are very rich, but they are not commonly used. Generally speaking, "I, F, E, A, X" is the most commonly used format.

Iw[。 M] Output an integer with the width of w characters, and at least output m numbers.

Such as: write(*, "(I5)") 100 Output: _100; The first two spaces

Fw.d outputs floating-point numbers in the W-character text box, and the decimal part is D-character wide. If the output text box is set incorrectly, an * sign will appear.

Such as: write (*, "(F9.3)") 123.45 output: _123.450; The first two spaces, followed by 0

Ew.d[Ee] uses scientific counting method to output floating-point numbers with a width of w characters, with the decimal part accounting for d characters and the exponential part outputting at least e numbers.

Such as: write (*, "(e 15.7)" 123.45 output: _ _ 0.1234500e+03; If the output is not 15 characters, fill in spaces, and if the decimal part is less than 7 digits, fill in 0.

The usage of Dw.d is the same as that of Ew.d, except that the letter used to represent the index is changed from e to d when outputting.