![forums.silverfrost.com Forum Index](templates/subSilver/images/logo_phpBB.gif) |
forums.silverfrost.com Welcome to the Silverfrost forums
|
View previous topic :: View next topic |
Author |
Message |
JohnCampbell
Joined: 16 Feb 2006 Posts: 2554 Location: Sydney
|
Posted: Fri Feb 09, 2018 12:28 pm Post subject: |
|
|
I think a good approach for /tab would be to do as gFortran has done and replicate the Intel "Tab-Format Lines" approach.
What is also necessary is that FTN95 and PLATO have the same interpretation of equivalent spaces for <HT>. With this approach, this post would not be necessary as the position of column 73 would be clearly displayed.
Perhaps a better warning of the line format, such as containing <HT> or lines that don't end in <CR><LF>.
The list could continue ... |
|
Back to top |
|
![](templates/subSilver/images/spacer.gif) |
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 7925 Location: Salford, UK
|
Posted: Fri Feb 09, 2018 12:43 pm Post subject: |
|
|
John
I am not familiar with "Tab-Format Lines" and what does <HT> mean?
The extension to configurable tab size was easy to implement but I am not contemplating anything further. Presumably it only relates to fixed format which means legacy code. |
|
Back to top |
|
![](templates/subSilver/images/spacer.gif) |
mecej4
Joined: 31 Oct 2006 Posts: 1886
|
|
Back to top |
|
![](templates/subSilver/images/spacer.gif) |
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 7925 Location: Salford, UK
|
Posted: Fri Feb 09, 2018 3:14 pm Post subject: |
|
|
Thanks for this. |
|
Back to top |
|
![](templates/subSilver/images/spacer.gif) |
jalih
Joined: 30 Jul 2012 Posts: 196
|
Posted: Fri Feb 09, 2018 3:15 pm Post subject: Re: |
|
|
JohnCampbell wrote: |
I looked in the Intel documentation and it provides a "Tab-Format Lines", which basically tabs to column 7. There are special cases for continuation, comments and statement numbers.
For tabs past column 7, it treats the tab character in a statement field the same way it treats a blank character. (assuming single blank for column 72 problem ?)
This could be confusing, as most IDE's will replace with multiple spaces.
Look at the following link for more details.
https://software.intel.com/en-us/fortran-compiler-18.0-developer-guide-and-reference-fixed-and-tab-source-forms
|
It also notes:
NOTE
If you use the sequence number field, do not use tabs anywhere in the source line, or the compiler may interpret the sequence numbers as part of the statement field in your program.
I would use ISPF-style editor, like SPFLite on Windows to work with fixed format source files. You can set tabs and column markers and just type away, plus there are a lot of commands to help work with fixed format source files.
For an example, you could type command: EX ALL; SHOW P'=' 73 80 ALL
It would show all the lines using sequence number field and hide the rest. |
|
Back to top |
|
![](templates/subSilver/images/spacer.gif) |
DanRRight
Joined: 10 Mar 2008 Posts: 2816 Location: South Pole, Antarctica
|
Posted: Sun Apr 15, 2018 1:42 pm Post subject: Re: |
|
|
PaulLaidler wrote: | I think that gFortran treats tabs as 6 spaces. FTN95 has 8 spaces.
It looks like it would be a relatively simple job to add a new FTN95 option /TAB 6 etc. in order to change from 8 to 6. Let me know if this would make it significantly easier. However, editors like Plato often have an automatic way to translate tabs into spaces. |
Paul, Was this feature implemented in last release? |
|
Back to top |
|
![](templates/subSilver/images/spacer.gif) |
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 7925 Location: Salford, UK
|
Posted: Mon Apr 16, 2018 1:01 pm Post subject: |
|
|
Yes. See my post on 9 Feb 2018. |
|
Back to top |
|
![](templates/subSilver/images/spacer.gif) |
DanRRight
Joined: 10 Mar 2008 Posts: 2816 Location: South Pole, Antarctica
|
Posted: Tue Apr 17, 2018 6:02 am Post subject: |
|
|
Paul, How it works?
Here is the file with fixed form Fortran text which uses more or less standard 8 space long TAB for the left margins of all lines. The line with continuation is intentionally made 73 characters long.
Code: | parameter (N=5)
real*8 X(N), Y(N)
Data X/1e1, 1e2, 1e3, 1e4, 1e5/
Data Y/2.2, 66, 8333, 1111, 777/
i=winio@('%ww%pv%pl[framed,x_array,scale=log_log,N_GRAPHS=1]',
* 625,500,N,X,Y)
end |
Compiling file called aaa.for with
>ftn95 aaa.for /link /wide_source
works OK. Shortening the long line to 72 characters of course works too even without /wide_source. But compilation
>ftn95 aaa.for /link /tabs 6
or any other tab value does not work.
(By the way the plot displays X axis correctly while Y axis incorrectly. But if resize it with the mouse little bit the X axis becomes wrong while Y is displayed correctly. Do everyone see the same behavior or this is just me?)
Last edited by DanRRight on Tue Apr 17, 2018 1:28 pm; edited 1 time in total |
|
Back to top |
|
![](templates/subSilver/images/spacer.gif) |
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 7925 Location: Salford, UK
|
Posted: Tue Apr 17, 2018 7:30 am Post subject: |
|
|
Dan
Where are the tabs? When I copy your program I get 3 spaces at the start of each line apart from the continuation that has 5 spaces. Also, are there any tabs within the text? |
|
Back to top |
|
![](templates/subSilver/images/spacer.gif) |
DanRRight
Joined: 10 Mar 2008 Posts: 2816 Location: South Pole, Antarctica
|
Posted: Tue Apr 17, 2018 8:39 am Post subject: |
|
|
Unfortunately forums removes tabs substituting them with 3 spaces. Here i marked all tabs used with the keyword <...>. Forum might also removed the spaces i added to make the long line to be 73 character long
Code: |
<...>parameter (N=5)
<...>real*8 X(N), Y(N)
<...>Data X/1e1, 1e2, 1e3, 1e4, 1e5/
<...>Data Y/2.2, 66, 8333, 1111, 777/
<...>i=winio@('%ww%pv%pl[framed,x_array,scale=log_log,N_GRAPHS=1]',
* 625,500,N,X,Y)
<...>end |
Last edited by DanRRight on Tue Apr 17, 2018 1:29 pm; edited 2 times in total |
|
Back to top |
|
![](templates/subSilver/images/spacer.gif) |
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 7925 Location: Salford, UK
|
Posted: Tue Apr 17, 2018 12:53 pm Post subject: |
|
|
Yes this was not working correctly and has now been fixed for the next release of FTN95. |
|
Back to top |
|
![](templates/subSilver/images/spacer.gif) |
DanRRight
Joined: 10 Mar 2008 Posts: 2816 Location: South Pole, Antarctica
|
Posted: Tue Apr 17, 2018 3:55 pm Post subject: |
|
|
Thanks, Paul |
|
Back to top |
|
![](templates/subSilver/images/spacer.gif) |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|