Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Missing width count for 'E' descriptor 1

Status
Not open for further replies.

Arnoshka

Technical User
Jul 10, 2009
17
DE
Hello

I'm having big trouble debugging a program in Fortran77.
The compiler shows two error messages in row 5709:

error 270 - Missing width count for 'E' descriptor
error 274 - Unknown edit descriptor 'm', or missing comma

with the following program code:
Row 5704
577 format(1h /// 19x,67h(boundary element code for thermoelastic syst
Row 5705
aems) / 19x,28h - - -
Row 5706
a,9h -- ///,13x,
Row 5707
a ' beanspruchungsrechnung allgemein dreidimensionaler bauteile'
Row 5708
a/ 18x,' im rahmen der linearen elastostatik mithilfe der'
Row 5709
a/ 18x, b o u n d a r y e l e m e n t m e t h o d e)

I've been trying to solve the problem with all I could find in the Fortran manual.
Some advice would be highly appreciated.

Kind regards
Arno
 
I hope this is enough if its not I could post the entire first subprogram with about 12000 rows.

570 format(1h1//, 45h edv-programmsystem der forschungsvereinigung,
a32h verbrennungskraftmaschinen e.v.,
a ///////,21x,44h ***** ****** ******* ***** * *)
571 format(1h ,21x,42h * * * * * * *)
572 format(1h ,21x,42h * * * * * * * )
573 format(1h ,21x,58h ***** ***** * **** * (3d
a) )
574 format(1h ,21x,42h * * * * * * )
575 format(1h ,21x,42h * * * * * * )
576 format(1h ,21x,42h ***** ****** * ***** * )
c.sr 29aug85
577 format(1h /// 19x,67h(boundary element code for thermoelastic syst
aems) / 19x,28h - - -
a,9h -- ///,13x,
a ' beanspruchungsrechnung allgemein dreidimensionaler bauteile'
a/ 18x,' im rahmen der linearen elastostatik mithilfe der'
a/ 18x, b o u n d a r y e l e m e n t m e t h o d e)
578 format(/////,8h thema: ,20a4,/,1h1)
 
Hallo Arno,

Your program source is for old fashioned formatted Fortran 77, the source should be written from 7th column,
the column 6 is for the continuation characters, whch are in your source the characters [COLOR=red yellow]a[/color].

formats.for
Code:
      [COLOR=#a020f0]program[/color] formats
[COLOR=#0000ff]C---- write the header: BETSY 3d     [/color]
      [COLOR=#804040][b]write[/b][/color] ([COLOR=#804040][b]*[/b][/color],[COLOR=#ff00ff]570[/color])
      [COLOR=#804040][b]write[/b][/color] ([COLOR=#804040][b]*[/b][/color],[COLOR=#ff00ff]571[/color])
      [COLOR=#804040][b]write[/b][/color] ([COLOR=#804040][b]*[/b][/color],[COLOR=#ff00ff]572[/color])
      [COLOR=#804040][b]write[/b][/color] ([COLOR=#804040][b]*[/b][/color],[COLOR=#ff00ff]573[/color])
      [COLOR=#804040][b]write[/b][/color] ([COLOR=#804040][b]*[/b][/color],[COLOR=#ff00ff]574[/color])
      [COLOR=#804040][b]write[/b][/color] ([COLOR=#804040][b]*[/b][/color],[COLOR=#ff00ff]575[/color])
      [COLOR=#804040][b]write[/b][/color] ([COLOR=#804040][b]*[/b][/color],[COLOR=#ff00ff]576[/color])
      [COLOR=#804040][b]write[/b][/color] ([COLOR=#804040][b]*[/b][/color],[COLOR=#ff00ff]577[/color])
[COLOR=#0000ff]C---- Formats     [/color]
  [COLOR=#6a5acd]570[/color] [COLOR=#804040][b]format[/b][/color](1h1[COLOR=#804040][b]//[/b][/color],    45h edv[COLOR=#804040][b]-[/b][/color]programmsystem der forschungsvereinigung,
     [highlight #ffff00][COLOR=#0000ff]a[/color][/highlight]32h verbrennungskraftmaschinen e.v., 
     [highlight #ffff00][COLOR=#0000ff]a[/color][/highlight]      [COLOR=#804040][b]///////[/b][/color],[COLOR=#008080]21x[/color],44h  [COLOR=#804040][b]*****[/b][/color]    [COLOR=#804040][b]******[/b][/color]  [COLOR=#804040][b]*******[/b][/color]   [COLOR=#804040][b]*****[/b][/color]   [COLOR=#804040][b]*[/b][/color]     [COLOR=#804040][b]*[/b][/color])
  [COLOR=#6a5acd]571[/color] [COLOR=#804040][b]format[/b][/color](1h ,[COLOR=#008080]21x[/color],42h [COLOR=#804040][b]*[/b][/color]    [COLOR=#804040][b]*[/b][/color]   [COLOR=#804040][b]*[/b][/color]          [COLOR=#804040][b]*[/b][/color]     [COLOR=#804040][b]*[/b][/color]         [COLOR=#804040][b]*[/b][/color]   [COLOR=#804040][b]*[/b][/color])
  [COLOR=#6a5acd]572[/color] [COLOR=#804040][b]format[/b][/color](1h ,[COLOR=#008080]21x[/color],42h [COLOR=#804040][b]*[/b][/color]    [COLOR=#804040][b]*[/b][/color]   [COLOR=#804040][b]*[/b][/color]          [COLOR=#804040][b]*[/b][/color]     [COLOR=#804040][b]*[/b][/color]          [COLOR=#804040][b]*[/b][/color] [COLOR=#804040][b]*[/b][/color] )
  [COLOR=#6a5acd]573[/color] [COLOR=#804040][b]format[/b][/color](1h ,[COLOR=#008080]21x[/color],58h [COLOR=#804040][b]*****[/b][/color]    [COLOR=#804040][b]*****[/b][/color]      [COLOR=#804040][b]*[/b][/color]      [COLOR=#804040][b]****[/b][/color]       [COLOR=#804040][b]*[/b][/color]     (3d
     [highlight #ffff00][COLOR=#0000ff]a[/color][/highlight])         )
  [COLOR=#6a5acd]574[/color] [COLOR=#804040][b]format[/b][/color](1h ,[COLOR=#008080]21x[/color],42h [COLOR=#804040][b]*[/b][/color]    [COLOR=#804040][b]*[/b][/color]   [COLOR=#804040][b]*[/b][/color]          [COLOR=#804040][b]*[/b][/color]          [COLOR=#804040][b]*[/b][/color]      [COLOR=#804040][b]*[/b][/color]  )
  [COLOR=#6a5acd]575[/color] [COLOR=#804040][b]format[/b][/color](1h ,[COLOR=#008080]21x[/color],42h [COLOR=#804040][b]*[/b][/color]    [COLOR=#804040][b]*[/b][/color]   [COLOR=#804040][b]*[/b][/color]          [COLOR=#804040][b]*[/b][/color]          [COLOR=#804040][b]*[/b][/color]      [COLOR=#804040][b]*[/b][/color]  )
  [COLOR=#6a5acd]576[/color] [COLOR=#804040][b]format[/b][/color](1h ,[COLOR=#008080]21x[/color],42h [COLOR=#804040][b]*****[/b][/color]    [COLOR=#804040][b]******[/b][/color]     [COLOR=#804040][b]*[/b][/color]     [COLOR=#804040][b]*****[/b][/color]       [COLOR=#804040][b]*[/b][/color]  )
  [COLOR=#6a5acd]577[/color] [COLOR=#804040][b]format[/b][/color](1h [COLOR=#804040][b]///[/b][/color] [COLOR=#008080]19x[/color],67h(boundary element code for thermoelastic syst
     [highlight #ffff00][COLOR=#0000ff]a[/color][/highlight]ems)                   [COLOR=#804040][b]/[/b][/color] [COLOR=#008080]19x[/color],28h [COLOR=#804040][b]-[/b][/color]        [COLOR=#804040][b]-[/b][/color]                [COLOR=#804040][b]-[/b][/color]
     [highlight #ffff00][COLOR=#0000ff]a[/color][/highlight],9h       [COLOR=#804040][b]--[/b][/color] [COLOR=#804040][b]///[/b][/color],[COLOR=#008080]13x[/color],
     [highlight #ffff00][COLOR=#0000ff]a[/color][/highlight]    [COLOR=#ff00ff]' beanspruchungsrechnung allgemein dreidimensionaler bauteile'[/color]
     [highlight #ffff00][COLOR=#0000ff]a[/color][/highlight][COLOR=#804040][b]/[/b][/color] [COLOR=#008080]18x[/color],[COLOR=#ff00ff]' im rahmen der linearen elastostatik mithilfe der'[/color]
     [highlight #ffff00][COLOR=#0000ff]a[/color][/highlight][COLOR=#804040][b]/[/b][/color] [COLOR=#008080]18x[/color],[COLOR=#ff00ff]' b o u n d a r y  e l e m e n t  m e t h o d e'[/color])
  [COLOR=#6a5acd]578[/color] [COLOR=#804040][b]format[/b][/color]([COLOR=#804040][b]/////[/b][/color],8h thema: ,20a4,[COLOR=#804040][b]/[/b][/color],1h1)
[COLOR=#0000ff]C----       [/color]
      [COLOR=#a020f0]END[/color]
Now I compile it with g77
Code:
$ g77 formats.for -o formats
and now it's deciphered - es kommt die Ueberaschung
:)
Code:
$ formats
1

 edv-programmsystem der forschungsvereinigung verbrennungskraftmaschinen e.v.






                       *****    ******  *******   *****   *     *
                       *    *   *          *     *         *   *
                       *    *   *          *     *          * * 
                       *****    *****      *      ****       *     (3d)         
                       *    *   *          *          *      *  
                       *    *   *          *          *      *  
                       *****    ******     *     *****       *  
 


                   (boundary element code for thermoelastic systems)                  
                    -        -                -       --


              beanspruchungsrechnung allgemein dreidimensionaler bauteile
                   im rahmen der linearen elastostatik mithilfe der
                   b o u n d a r y  e l e m e n t  m e t h o d e
 
Thank You very much.
I was trying to find the cause for the error in the code and not in the build of the compiler.

I'll try to arrange on of those fortran77 compilers.
 
I forgot to say, I corrected/replaced only this
Code:
     a/ 18x,  b o u n d a r y  e l e m e n t  m e t h o d e)
with this
Code:
     a/ 18x,' b o u n d a r y  e l e m e n t  m e t h o d e')
 
arnoshka said:
I'll try to arrange on of those fortran77 compilers.
I don't know what compiler are you using, but the code I posted could be compiled with g95 and gfortran too - it will be recognized automatically when you use the file extension *.for or *.f, or with other extension using the compiler option -ffixed-form,
look here:
Code:
$ g95 formats.for -o formats             

$ gfortran formats.for -o formats

$ g95 formats.f90 -o formats -ffixed-form
 
I'm using "Silverfrost Plato". A professor recommended it to me.
Today i'll try open watcom and if that is not workng for me I'll try to arrange a g77 or gfortran or g95 compiler for me.

May I ask one more question? Where are these lines of code to be put into?
Code:
$ g95 formats.for -o formats             

$ gfortran formats.for -o formats

$ g95 formats.f90 -o formats -ffixed-form

Is that part of the g-compiler series or is it a command to insert into the execute window of windows?

 
Hi Arno,

The above lines are command lines for compilation, to be used on command prompt.

I have all three free fortran compilers installed - g77, gfortran and g95:
1. g77 was part of my MSYS/Mingw installation
Maybe, the actual version of Mingw is delivered with gfortran.

2. gfortran I installed separately - probably from this location:

3. g95 I installed from here:

I don't use Silverfrost, because I rather use free compilers, than commercial ones or restricted personal editions.
If I want an fortran IDE I would rather try an eclipse based IDE Photran.
But for that little Fortran I do on this forum I don't need an IDE. For Fortran, like for most languages I only use the free vim editor. It has syntax highlighting for dozen of languages and btw thanks to vim I can post colored code at this forum.

* However, when your professor recommended to you Silverfrost, than use it.
 
Hello "mikrom",

thank you once again for your help. My program code is still having some bugs, but the compiler doesn't give any further complains.
Sillverfrost doesn't not automatically recognize Fortran77 code.
After forcing to only accept fortran77, I'm all satisfied.

kind regards
Arno
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top