Class FortranFormat

  • public class FortranFormat
    extends Object
    Converts a String representation of a Fortran double to a double.

    A modified version of the atof method provided in the Core Java books by Cay S. Horstmann & Gary Cornell. The main difference here is that we scan for Fortran double precision characters ('D' and 'd') which often cause the C versions of atof to barf.

    Dan Gezelter
    Source code:
    Belongs to CDK module:
    • Constructor Detail

      • FortranFormat

        public FortranFormat()
    • Method Detail

      • atof

        public static double atof​(String s)
        Converts a string of digits to an double.
        s - a string denoting a double