Article View: comp.arch
Article #182Re: Comment delimiters
From: EricP
Date: Sun, 18 Oct 2026 14:55
Date: Sun, 18 Oct 2026 14:55
89 lines
4614 bytes
4614 bytes
On 2026-Oct-17 10:58, Thomas Koenig wrote:
> EricP <ThatWouldBeTelling@thevillage.com> schrieb:
>
>> DEC F77 had a number of enhancements which made the language
>> more friendly, like tab in column 1 skips to the start of a
>> statement
>
> That didn't make it into the language, and also makes calculation
> of the line length a bit awkward. When should the line end?
> Remember, collumn 73-80 are ignored.
That shouldn't be a problem.
A tab in columns 1 to 6 meant jump to column 7, the statement start.
DEC also optionally allowed lines up to 132 characters -
the full width of a VT100 in widescreen mode!
>> or ! anywhere is a comment to end of line.
>
> Was that a DEC extension? At least it was adapted in Fortran 90.
Yes
There were lots more. 32 character variables (up from the standard 8).
DEC F77 used a stack and allowed recursion if you were careful
whereas IBM F77 did not (it used static allocation for all local
variables so recursion stomped on their values).
>> These were adopted by many other F77 compiler vendors
>> presumably because they wanted to get their customers.
>
> They are a rat's nest. Yes, many were convenient, but compilers
> more or less have to keep supporting them for legacy code.
> gfortran has -fdec, which in turn enables around ten extensions,
> but not everything is implemented, for example variable formats
> or the infamous Q format descriptor.
>
> And, of course, the (in)famous PARAMETER X=20 snafu.
I don't know that one. Do tell...
>> Parenthesis can be used to force an order of execution.
>> The parenthesis ordering rule is also data type dependent.
>> It applies to integer, logical (also integer) and real but not strings.
>
> Not sure what use they would be for strings... but where did you get
> that information from?
I have a 1988 copy of the DEC Fortran manual.
I was looking at it for a specific set of parenthesis rules
but no such luck. But it did say that parenthesis do not affect
the value of a character string.
My point being that whereas in many languages the parser can
toss parenthesis, in F77 expressions they may be significant,
and that significance may be semantic dependent.
>> #1 a + b + c Unordered
>> #2 (a+b) + c a+b before +c
>> #3 a + (b+c) b+c before +a
>>
>> This would interact with common subexpression elimination.
>> Above would not be able to optimize all 3 expressions to 1.
>> It can replace #1 with #2 or #3, but not both.
>>
>> I'm not sure but I think parenthesis also could block optimizations
>> like a*b+a*c => a*(b+c) but (a*b)+(a*c) might not be optimized.
>
> The rule is simple: In Fortran, parameters have to be honored,
> otherwise the rules of standard mathematics apply. So,
> a + b - a can be optimized to b.
>
Yes but determining if two expressions are equivalent
and therefore candidates for elimination can require
some massaging first.
#4 a + ((b+c))
the first ( is significant, the second ( is redundant,
and #4 should match #3 and not #2.
But the following string expressions are all equivalent
#5 ('ABC')//('DE')//'F'
#6 'ABC'//('DE'//'F')
#7 'ABC'//'DE'//'F'
Technical Details
Message-ID:
<465BS.66342$ACx3.13820@fx15.iad>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!peer01.iad!feed-me.highwinds-media.com!news.highwinds-media.com!fx15.iad.POSTED!not-for-mailReferences:
<1791742457-5857@newsgrouper.org> <11aig3c$3hdcn$1@dont-email.me> <11aiqc0$3kr94$3@dont-email.me> <179190779286.25645.14465927900754526737@media.vsta.org> <179190779286.25645.14465927900754526737@media.vsta.org> <vandys@vsta.org> <jwvjynl2cg0.fsf-monnier+comp.arch@gnu.org> <808vclt9i2mso89n1itvnvos5j88g1mopl@4ax.com> <6acfc2b2.1547984@news.eternal-september.org> <HZQzS.6$TYg.3@fx21.iad> <2026Oct15.081750@mips.complang.tuwien.ac.at> <9ysAS.182538$QPx3.16043@fx17.iad> <2026Oct16.195605@mips.complang.tuwien.ac.at> <zhLAS.37514$1l6.27878@fx42.iad> <11b02fd$9e1u$1@dont-email.me>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!peer01.iad!feed-me.highwinds-media.com!news.highwinds-media.com!fx15.iad.POSTED!not-for-mail MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: Comment delimiters Newsgroups: comp.arch References: <1791742457-5857@newsgrouper.org> <11aig3c$3hdcn$1@dont-email.me> <11aiqc0$3kr94$3@dont-email.me> <179190779286.25645.14465927900754526737@media.vsta.org> <179190779286.25645.14465927900754526737@media.vsta.org> <vandys@vsta.org> <jwvjynl2cg0.fsf-monnier+comp.arch@gnu.org> <808vclt9i2mso89n1itvnvos5j88g1mopl@4ax.com> <6acfc2b2.1547984@news.eternal-september.org> <HZQzS.6$TYg.3@fx21.iad> <2026Oct15.081750@mips.complang.tuwien.ac.at> <9ysAS.182538$QPx3.16043@fx17.iad> <2026Oct16.195605@mips.complang.tuwien.ac.at> <zhLAS.37514$1l6.27878@fx42.iad> <11b02fd$9e1u$1@dont-email.me> Content-Language: en-CA From: EricP <ThatWouldBeTelling@thevillage.com> In-Reply-To: <11b02fd$9e1u$1@dont-email.me> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Lines: 89 Message-ID: <465BS.66342$ACx3.13820@fx15.iad> X-Complaints-To: abuse@UsenetServer.com NNTP-Posting-Date: Sun, 18 Oct 2026 14:56:00 UTC Date: Sun, 18 Oct 2026 10:55:58 -0400 X-Received-Bytes: 4382