fprintf with old fortran type format

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello All, 

I have a simple C-application under linux that dumps 
a file following the fortran format (for reason of 
compatibility with another fortran code):

 -5.8500E-06  6.1379E-06  3.7700E+00 -8.6851E+00  1.6587E+01  1.7789E+07  
1.2686E+01 -2.0000E-04   1   5
  7.8154E-04 -7.6327E-05  7.7007E-04  1.3974E+02 -2.4259E+03 -2.3236E+04  
1.5000E-03 -2.0000E-04   1   3
 -1.0805E-04  7.5232E-04 -9.3542E-04  2.4451E+03  4.1420E+02  2.0763E+04 
-1.5000E-03 -2.0000E-04   1   3
  1.6066E-03 -1.6012E-04  1.4611E-03  2.3279E+02 -4.7181E+03 -4.0685E+04  
3.0000E-03 -2.0000E-04   1   3
 -2.9795E-05  1.6006E-03 -1.7185E-03  4.7022E+03  5.9128E+02  2.1321E+04 
-3.0000E-03 -2.0000E-04   1   3
  2.3934E-03 -6.3027E-04  1.9306E-03  1.2812E+02 -7.1726E+03 -5.6825E+04  
4.5000E-03 -2.0000E-04   1   3



Under linux I used the syntax:
                fprintf (fh," %' '.4E %' '.4E %' '.4E %' '.4E %' '.4E %' 
'.4E %' '.4E %' '.4E %' 'd %' 'd\n", 
                        X[i][0], X[i][1], X[i][2], X[i][3], X[i][4], 
X[i][5], 
                        X[i][6],X[i][7], (int)X[i][8], (int)X[i][9]);

which work well. When I try to compile this under windows it does 
not work anymore but dumps the "'" in the output file. 

Anybody has some suggestion? 

Thank you in advance, 

             -- Philippe Piot. 


[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux