Silverfrost Forums

Welcome to our forums

Spaces and 72-character limit

15 Apr 2018 12:42 #21841

Quoted from PaulLaidler 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?

16 Apr 2018 12:01 #21849

Yes. See my post on 9 Feb 2018.

17 Apr 2018 5:02 (Edited: 17 Apr 2018 12:28) #21854

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.

	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?)

17 Apr 2018 6:30 #21855

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?

17 Apr 2018 7:39 (Edited: 17 Apr 2018 12:29) #21856

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

<...>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
17 Apr 2018 11:53 #21863

Yes this was not working correctly and has now been fixed for the next release of FTN95.

17 Apr 2018 2:55 #21866

Thanks, Paul

Please login to reply.