1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

reading fp-values written in Fortran D-format in C

Discussion in 'C' started by Alex, Apr 12, 2009.

  1. Alex

    Alex New Member

    Joined:
    Oct 1, 2006
    Messages:
    22
    Likes Received:
    0
    Trophy Points:
    0
    [cross-posting to get views from both sides of the pond]
    Hi all.
    I have some trouble reading floating-point numbers written with the Fortran
    D-descriptor:
    $> cat dout.f90
    write( *, FMT="(d13.5)") 3.1415
    end
    $> gfortran dout.f90 -o dout && ./dout
    0.31415D+01
    Reading above number via [f]scanf in C:
     

Share This Page