View previous topic :: View next topic |
Author |
Message |
Magliola
Joined: 10 Feb 2014 Posts: 8 Location: Chicago, Illinois USA
|
Posted: Mon Feb 10, 2014 6:57 pm Post subject: Free Source Form Criteria |
|
|
I am compiling a program with Silverfrost FTN95 that compiles using the COMPAQ DVF compiler. I was getting syntax errors and one of the issues seems to be the length of the free source form line of code. (When I reduce the amount of indent white space at the start of the line the error goes away.) So I suspect COMPAQ DVF allows a longer length source code line then Silverfrost FTN95.
I have been looking in the FTN95 documentation, but I don't see where the free source form criteria and limitations/extensions are spelled out. Can someone please direct me to where in the documentation I need to look for documentation on free source form? Also - How does the compiler know if the form syntax has been entered as free or fixed? Is it by the source file extension? Thank you. _________________ Regards,
Bob |
|
Back to top |
|
 |
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 8210 Location: Salford, UK
|
Posted: Mon Feb 10, 2014 8:11 pm Post subject: |
|
|
You can have up to 132 characters by default.
The difference may be due to the tab size - FTN95 replaces a tab by 8 spaces. |
|
Back to top |
|
 |
Magliola
Joined: 10 Feb 2014 Posts: 8 Location: Chicago, Illinois USA
|
Posted: Mon Feb 10, 2014 11:00 pm Post subject: |
|
|
Thank you very much.
The 132 character limit and the conversion of tabs to 8 spaces explains why bringing the DVF source into FTN95 has an issue.
In Visual Studio�s editor it would be nice to have text beyond 132 characters changed to a different color. (Like text beyond 72 characters is given different color for FORTRAN fixed form files.) _________________ Regards,
Bob |
|
Back to top |
|
 |
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 8210 Location: Salford, UK
|
Posted: Mon Feb 10, 2014 11:16 pm Post subject: |
|
|
I am not sure about the FTN95 plug-in for Visual Studio but Plato only does this for fixed format Fortran files.
However, to make this work you have to set the tab size in the editor (Plato or VS) to 8 in order to match the FTN95 compiler.
p.s. On second thoughts, in the editors, tabs form columns whilst FTN95 will simply replace every tab with 8 spaces. So it just won't work. |
|
Back to top |
|
 |
JohnCampbell
Joined: 16 Feb 2006 Posts: 2615 Location: Sydney
|
Posted: Tue Feb 11, 2014 3:15 am Post subject: |
|
|
As far as I know, tabs are not included in the Fortran standard character set, both for code and also in formatted text files for I/O.
Given how their interpretation is different for most IDE's or compilers, I would recommend against ever using them.
John |
|
Back to top |
|
 |
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 8210 Location: Salford, UK
|
Posted: Tue Feb 11, 2014 9:54 am Post subject: |
|
|
Plato has a command for replacing all tabs (within the current file) with spaces. You will find it under then menu Tools, then Options, then Environment->Keyboard. You will find it named as Edit.ReplaceTabs and from there you will be able to assign an accelerator key of your choice. |
|
Back to top |
|
 |
|