Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Help with formatted output in fortran

  1. Mar 5, 2010 #1

    I am trying to print in formatted output using the format specifiers but I am not able to get the correct output.
    I am trying to print an array with 11 reals, followed by one more real number and finally an integer.

    When I skip the integer, the format statement works and but when I add the integer I get an error.
    Code (Text):

    C  Works with array of 11 reals followed by another real
    Code (Text):

    I get this error:
    Code (Text):

    Fortran runtime error: Expected INTEGER for item 8 in formatted transfer, got REAL
    Can someone please guide me the correct way to print this output and explain what I am doing wrong in the above format ? Thanks

  2. jcsd
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Can you offer guidance or do you also need help?
Draft saved Draft deleted

Similar Threads - Help formatted output Date
Unusual date format Feb 27, 2018
C/++/# Help with MATLAB code? Feb 9, 2018
What's wrong with my bisection method code? Dec 10, 2017
Help: Convert Matlab to Python code Dec 8, 2017