🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.arch
Article #170

Re: Comment delimiters

#170
From: Thomas Koenig
Date: Sat, 17 Oct 2026 14:58
50 lines
3591 bytes
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.

> or ! anywhere is a comment to end of line.

Was that a DEC extension?  At least it was adapted in Fortran 90.

> 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.

> 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?
>#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.

-- 
This USENET posting was made without artificial intelligence,
artificial impertinence, artificial arrogance, artificial stupidity,
artificial flavorings or artificial colorants.
Technical Details
Message-ID: <11b02fd$9e1u$1@dont-email.me>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!eternal-september.org!feeder.eternal-september.org!nntp.eternal-september.org!.POSTED!not-for-mail
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>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!eternal-september.org!feeder.eternal-september.org!nntp.eternal-september.org!.POSTED!not-for-mail
From: Thomas Koenig <tkoenig@netcologne.de>
Newsgroups: comp.arch
Subject: Re: Comment delimiters
Date: Sat, 17 Oct 2026 14:58:53 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 50
Message-ID: <11b02fd$9e1u$1@dont-email.me>
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>
Injection-Date: Sat, 17 Oct 2026 14:58:54 +0000 (UTC)
Injection-Info: dont-email.me;
	logging-data="309310"; mail-complaints-to="abuse@eternal-september.org";	posting-account="U2FsdGVkX18OY6aZufdqhR9o4kewET8j3mgLZ4pfyaM="; posting-host="1d7488cb12994fd593f79ba654feadc7"
User-Agent: slrn/1.0.3 (Linux)
Cancel-Lock: sha1:Yf2sL7AT5joHkKGzZJIqhUeOB5g= sha256:bYtmDs4A3vcbay8iQ9X5gikbkVb16dWG1XIC9AIrPHY=
	sha1:C/BdVcRiJyeaz0uTP9swltQtCdM= sha256:Onm72hP7P+bNu36dhd90vAWSChDaISoXbz91lEJtTl4=