- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I'm porting a code to ifort which is compiling correctly with IBM xlf compiler.
When I compile with ifort I've got problems with this continuation lines:
INTEGER kpdtsf,kpdwet,kpdsno,kpdzor,kpdais,kpdtg3,kpdplr,kpdgla,
& kpdmxi,kpdscv,kpdsmc,kpdoro,kpdmsk,kpdstc,kpdacn,kpdveg,
& kpdvet,kpdsot
& is in the beggining of the line, and ifort throws a syntax error.
The workaround is to manually insert & at the end of the line, like this
INTEGER kpdtsf,kpdwet,kpdsno,kpdzor,kpdais,kpdtg3,kpdplr,kpdgla, &
& kpdmxi,kpdscv,kpdsmc,kpdoro,kpdmsk,kpdstc,kpdacn,kpdveg, &
& kpdvet,kpdsot
But there are thousands of code lines (also doing with sed is quite difficult beacuse there are comments and other stuff...).
Is there any compilation flag to compile this syntax ? Or another workaround ?
Thank you very much,
Kim
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Is your source Fixed or Free format?
I can't tell from the code snippet in your post if some additional indentation was lost but the line continuation shown hints the source may be Fixed format and if so and those lines cause compile errors then that, and your work around, suggests the source was compiled as Free format by ifort. Unless overridden by a compiler option or directive, the source file suffix determines the source form applied at compilation.
If you use a Free form file suffix (.f90, .F90) but the source is Fixed form, thenyou can set the source format to Fixed with the compiler option: -fixed
Or use a file suffix that implies Fixed form, e.g. .f, .for, .FOR, .ftn, .FTN
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Is your source Fixed or Free format?
I can't tell from the code snippet in your post if some additional indentation was lost but the line continuation shown hints the source may be Fixed format and if so and those lines cause compile errors then that, and your work around, suggests the source was compiled as Free format by ifort. Unless overridden by a compiler option or directive, the source file suffix determines the source form applied at compilation.
If you use a Free form file suffix (.f90, .F90) but the source is Fixed form, thenyou can set the source format to Fixed with the compiler option: -fixed
Or use a file suffix that implies Fixed form, e.g. .f, .for, .FOR, .ftn, .FTN
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
It was this !!! I building a code that is quite a mess and there free and fixed forms mixed.
Thank you again !!!
KiM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
![](/skins/images/BC9A7A3465121B56B278007F4EE8899F/responsive_peak/images/icon_anonymous_message.png)
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page