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

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice