forums.silverfrost.com Forum Index forums.silverfrost.com
Welcome to the Silverfrost forums
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Spaces and 72-character limit
Goto page Previous  1, 2
 
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> General
View previous topic :: View next topic  
Author Message
JohnCampbell



Joined: 16 Feb 2006
Posts: 1880
Location: Sydney

PostPosted: Fri Feb 09, 2018 12:28 pm    Post subject: Reply with quote

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
View user's profile Send private message
PaulLaidler
Site Admin


Joined: 21 Feb 2005
Posts: 5173
Location: Salford, UK

PostPosted: Fri Feb 09, 2018 12:43 pm    Post subject: Reply with quote

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
View user's profile Send private message
mecej4



Joined: 31 Oct 2006
Posts: 791

PostPosted: Fri Feb 09, 2018 2:16 pm    Post subject: Re: Reply with quote

PaulLaidler wrote:

I am not familiar with "Tab-Format Lines" and what does <HT> mean?

<HT> is simply a mnemonic for char(9), "horizontal tab", '\t' in C.
Tab (ASCII 09, ctrl+I) characters in source and data have always caused trouble. I get rid of tabs from source files before compiling and from data files before reading them in a program.

The much less used vertical tab (except on line printers) <VT>, '\v' in C, is similar, but is rarely at issue. Likewise for the form feed character.

Here are two places where the widely used conventions for tabs are described:

https://software.intel.com/en-us/node/692006

https://docs.oracle.com/cd/E19957-01/805-4941/z40000a545d9/index.html

There are utilities for converting files with tabs:

http://fortranwiki.org/fortran/show/notab

http://fortranwiki.org/fortran/show/expand
Back to top
View user's profile Send private message
PaulLaidler
Site Admin


Joined: 21 Feb 2005
Posts: 5173
Location: Salford, UK

PostPosted: Fri Feb 09, 2018 3:14 pm    Post subject: Reply with quote

Thanks for this.
Back to top
View user's profile Send private message
jalih



Joined: 30 Jul 2012
Posts: 190

PostPosted: Fri Feb 09, 2018 3:15 pm    Post subject: Re: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> General All times are GMT + 1 Hour
Goto page Previous  1, 2
Page 2 of 2

 
Jump to:  
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