LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Error in format (https://www.linuxquestions.org/questions/linux-newbie-8/error-in-format-829515/)

adobs 08-31-2010 08:53 AM

Error in format
 
Hello everybody, good to join here I am a newbie and facing the problem while compiling the code. My error is as follow:

113 format((1I4,3x,1I,2(3x,F12.8)))
1
Error: Nonnegative width required in format string at (1)

Can anybody help me. Thanks and Regards.

grail 08-31-2010 08:58 AM

Well not to be too picky to start, but it might be nice to know what language we are talking about?

MensaWater 08-31-2010 09:01 AM

A quick Google search for the error suggests it is Fortran.

I don't know anything about Fortran but the discussion at this link may be relevant:
http://objectmix.com/fortran/34049-g95-error.html

adobs 08-31-2010 09:03 AM

My code is written in fortran90.

colucix 08-31-2010 10:11 AM

Code:

113 format((1I4,3x,1I,2(3x,F12.8)))
You missed the width in the highlighted integer descriptor. Also note that 1 as number of repetitions is superfluous. The following should work:
Code:

113 FORMAT(I4,3X,I1,2(3X,F12.8))


All times are GMT -5. The time now is 09:56 PM.