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
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:
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.
 
What about this from the link?

One suggestion is to remove the use statements, and see what the compiler/linker complains about being missing
 
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.
 

Similar threads

  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 16 ·
Replies
16
Views
2K
  • · Replies 6 ·
Replies
6
Views
4K
  • · Replies 3 ·
Replies
3
Views
6K
  • · Replies 4 ·
Replies
4
Views
3K
  • · Replies 2 ·
Replies
2
Views
3K
  • · Replies 5 ·
Replies
5
Views
3K
  • · Replies 22 ·
Replies
22
Views
4K
  • · Replies 1 ·
Replies
1
Views
5K
Replies
5
Views
17K