- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I suspect that most programmers are trending towards using free format, but I don't know. Is this the case nowadays?
Is there a difference in performance if a programuses fixed or free format?
If using fixed format, does the form line length affect performance, or is it just the programmer's preference if he/she uses 72,80, or 132 columns?
Thanks,
EP
I suspect that most programmers are trending towards using free format, but I don't know. Is this the case nowadays?
Is there a difference in performance if a programuses fixed or free format?
If using fixed format, does the form line length affect performance, or is it just the programmer's preference if he/she uses 72,80, or 132 columns?
Thanks,
EP
Link Copied
2 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
No difference in performance. Free format is preferred as it helps avoid some common coding errors that the compiler would not notice if fixed-form were used. Note that free-form source allows at least 132 columns.
Fixed-form source is "deprecated" in the current standard and should not be used for new code. I would especially warn against using compiler extensions to provide for fixed-form line lengths greater than 72 - this will definitely bite you later (if not sooner.)
Fixed-form source is "deprecated" in the current standard and should not be used for new code. I would especially warn against using compiler extensions to provide for fixed-form line lengths greater than 72 - this will definitely bite you later (if not sooner.)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I'm with Steve. Go with Free Format. I've been bitten too many times where a line is truncated at 72 columns where the truncated resultant line will compile just fine and without any warning. Dropping digits off of constants are one thing truncating an expression is another. You can look at
out = (some realy long expression) * TEMP3
with the 3 chopped off and without error message and not find the error. In Visual Studio with intilepoint hovering the mouse over TEMP3 will show TEMP3 as seen and not TEMP as used.
Save your self some time later and go with free format.
The only "problem" you might expect is in the sections where you do data initialization using continuation lines. This will take a little rework but it is not all that bad.
Jim Dempsey
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page