Microsoft KB Archive/32692

FORTRAN-80 Input Numbers May be Rounded Incorrectly

PSS ID Number: Q32692 Article last modified on 07-18-1988

3.36 3.37 3.42 3.43 3.44 CP/M-80

Summary: If a number is left-justified in the input field, it may have slight rounding errors as it is read. For example, reading 1.0bbbb may generate .99999… However, right-justified numbers are read properly; reading bbbb1.0 correctly returns 1.0. To avoid these errors, right-justify numbers in the input fields. You can also use commas as separators. For example, the following line can be read with a normal format such as 4f10.3: 1.0,2.3,4.21,6.8 Use commas to delimit the end of each number, rather than blank-filling each number to fill the specified width of the input field.