Fixing Nonnegative and Positive Width Errors in Fortran Code Format Strings

  • Context: Fortran 
  • Thread starter Thread starter MrElec
  • Start date Start date
  • Tags Tags
    Error Format
Join the discussion
Registration is free. Ask a follow-up in this thread, or start your own.
8 replies · 4K views
MrElec
When compiling a fortran code (*.f90) i got these errors:

1- Nonnegative width required in format string.
2- Positive width required in format specifier D.

In Code::Blocks Ide, these errors are referred in the code to :

format( 1000i ) and format ( 1000d ) respectively.

How can i solve this?
 
Last edited by a moderator:
Physics news on Phys.org
Thanks, I've tried your solution and WoW these errors disapeared but unfortunately i got this message : D:\Simulations\CM\LAPACK_ARPACK\DOUBLE LAPACK\dsecnd.f|16| Fatal Error: Can't open module file 'dfport.mod' for reading at (1): No such file or directory|. Do you have an idea about this problem
 
THese questions are best answered by searching with Google to see if others have encountered them:

https://stackoverflow.com/questions/35015117/fatal-error-cant-open-module-file-dfport-mod-for-reading-at-1
 
  • Like
Likes   Reactions: MrElec
I've googled this problem before posting it here. In the link you gave, the authors could not give a functional solution. For my case, I'm using gnu fortron as compiler and C::B as an ide.
 
I've tried to remove the use dfport statement, i got other error as etime
 
Thank you, i think that I've resolved my problem by switching off USE DFORT statement.