Rocksolid Light

Welcome to RetroBBS

mail  files  register  newsreader  groups  login

Message-ID:  

Chemistry professors never die, they just fail to react.


devel / comp.lang.fortran / What results this legacy code should give?

SubjectAuthor
* What results this legacy code should give?Ev. Drikos
+* Re: What results this legacy code should give?Arjen Markus
|`* Re: What results this legacy code should give?John
| `* Re: What results this legacy code should give?John
|  `- Re: What results this legacy code should give?Ev. Drikos
+* Re: What results this legacy code should give?Ron Shepard
|`* Re: What results this legacy code should give?Steve Lionel
| `* Re: What results this legacy code should give?Thomas Koenig
|  `* Re: What results this legacy code should give?Ron Shepard
|   +* Re: What results this legacy code should give?gah4
|   |`* Re: What results this legacy code should give?Thomas Koenig
|   | `* Re: What results this legacy code should give?James Van Buskirk
|   |  `* Re: What results this legacy code should give?Thomas Koenig
|   |   `- Re: What results this legacy code should give?Ron Shepard
|   +- Re: What results this legacy code should give?Gary Scott
|   +* Re: What results this legacy code should give?FortranFan
|   |`* Re: What results this legacy code should give?Ron Shepard
|   | `- Re: What results this legacy code should give?John
|   `- Re: What results this legacy code should give?Phillip Helbig (undress to reply
`- Re: What results this legacy code should give?Robin Vowels

1
What results this legacy code should give?

<t53752$d0s$1@gioia.aioe.org>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=2215&group=comp.lang.fortran#2215

  copy link   Newsgroups: comp.lang.fortran
Path: i2pn2.org!i2pn.org!aioe.org!IaqLjUS4FWg7CEYhqJEzpA.user.46.165.242.91.POSTED!not-for-mail
From: drikosev@gmail.com (Ev. Drikos)
Newsgroups: comp.lang.fortran
Subject: What results this legacy code should give?
Date: Fri, 6 May 2022 16:17:21 +0300
Organization: Aioe.org NNTP Server
Message-ID: <t53752$d0s$1@gioia.aioe.org>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Info: gioia.aioe.org; logging-data="13340"; posting-host="IaqLjUS4FWg7CEYhqJEzpA.user.gioia.aioe.org"; mail-complaints-to="abuse@aioe.org";
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:78.0)
Gecko/20100101 Thunderbird/78.5.1
X-Notice: Filtered by postfilter v. 0.9.2
X-Mozilla-News-Host: news://news.aioe.org:119
Content-Language: en-US
 by: Ev. Drikos - Fri, 6 May 2022 13:17 UTC

Hello,

Currently, my attention is on Legacy code, DEC/VMS.
IMOH, the results I see seem to be confusing. Maybe
it's my fault or GNU Fortran after version 8 gives
different results or what else?.

Results from other compilers that support DEC/VMS
extensions will be appreciated!

Thanks,
Ev. Drikos

--------------------------------------------------

$ gfc -ffixed-form par.f && ./a.out
parameters= 2.00000000
$ gfc -ffree-form par.f && ./a.out
parameters= 2.00000000
$ gfc --version 2>&1 | head -n1
GNU Fortran (GCC) 4.8.5

$ gfortran8 -fdec -ffixed-form par.f && ./a.out
parameters= 2.80259693E-45
$ gfortran8 -fdec -ffree-form par.f && ./a.out
parameters= 2.80259693E-45
$ gfortran8 --version 2>&1 | head -n1
GNU Fortran (GCC) 8.4.0

$ cat par.f
parameters = 2.0
print *, 'parameters=', parameters
end

Re: What results this legacy code should give?

<997fe062-044b-4f40-8324-ae14542ee6acn@googlegroups.com>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=2217&group=comp.lang.fortran#2217

  copy link   Newsgroups: comp.lang.fortran
X-Received: by 2002:a05:620a:2903:b0:6a0:4d8f:8b88 with SMTP id m3-20020a05620a290300b006a04d8f8b88mr652889qkp.328.1651848340164;
Fri, 06 May 2022 07:45:40 -0700 (PDT)
X-Received: by 2002:a81:9b0c:0:b0:2f4:c522:7d3c with SMTP id
s12-20020a819b0c000000b002f4c5227d3cmr2877254ywg.316.1651848339935; Fri, 06
May 2022 07:45:39 -0700 (PDT)
Path: i2pn2.org!i2pn.org!news.swapon.de!fu-berlin.de!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.fortran
Date: Fri, 6 May 2022 07:45:39 -0700 (PDT)
In-Reply-To: <t53752$d0s$1@gioia.aioe.org>
Injection-Info: google-groups.googlegroups.com; posting-host=62.194.62.207; posting-account=A91wAAoAAADgBUxBX6QqsrSD26GLhVp8
NNTP-Posting-Host: 62.194.62.207
References: <t53752$d0s$1@gioia.aioe.org>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <997fe062-044b-4f40-8324-ae14542ee6acn@googlegroups.com>
Subject: Re: What results this legacy code should give?
From: arjen.markus895@gmail.com (Arjen Markus)
Injection-Date: Fri, 06 May 2022 14:45:40 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
 by: Arjen Markus - Fri, 6 May 2022 14:45 UTC

On Friday, May 6, 2022 at 3:17:26 PM UTC+2, Ev. Drikos wrote:
> Hello,
>
> Currently, my attention is on Legacy code, DEC/VMS.
> IMOH, the results I see seem to be confusing. Maybe
> it's my fault or GNU Fortran after version 8 gives
> different results or what else?.
>
> Results from other compilers that support DEC/VMS
> extensions will be appreciated!
>
> Thanks,
> Ev. Drikos
>
> --------------------------------------------------
>
> $ gfc -ffixed-form par.f && ./a.out
> parameters= 2.00000000
> $ gfc -ffree-form par.f && ./a.out
> parameters= 2.00000000
> $ gfc --version 2>&1 | head -n1
> GNU Fortran (GCC) 4.8.5
>
> $ gfortran8 -fdec -ffixed-form par.f && ./a.out
> parameters= 2.80259693E-45
> $ gfortran8 -fdec -ffree-form par.f && ./a.out
> parameters= 2.80259693E-45
> $ gfortran8 --version 2>&1 | head -n1
> GNU Fortran (GCC) 8.4.0
>
> $ cat par.f
> parameters = 2.0
> print *, 'parameters=', parameters
> end
I compiled the program without -fdec and -ffixed-form and got this error:

1 | parameters = 2.0
| 1
Warning: Legacy Extension: PARAMETER without '()' at (1)

I think I understand - a bit - what is going on: your code is supposed to be fixed form. In fixed form spaces have no meaning. So the compiler (or better: some of the versions) probably interpret the first line as:

PARAMETER S = 2.0

So, a parameter "s" is defined and no variable "parameters". In that case you have an uninitialised variable and its value may be anything. Other versions may instead see this first line as defining a variable "parameters". Of course, this is a lot hineininterpretieren, but it might just fit :).

Regards,

Arjen

Re: What results this legacy code should give?

<4vbdK.242$7%M9.231@fx12.iad>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=2219&group=comp.lang.fortran#2219

  copy link   Newsgroups: comp.lang.fortran
Path: i2pn2.org!i2pn.org!aioe.org!news.uzoreto.com!npeer.as286.net!npeer-ng0.as286.net!peer01.ams1!peer.ams1.xlned.com!news.xlned.com!peer03.iad!feed-me.highwinds-media.com!news.highwinds-media.com!fx12.iad.POSTED!not-for-mail
MIME-Version: 1.0
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:91.0)
Gecko/20100101 Thunderbird/91.9.0
Subject: Re: What results this legacy code should give?
Content-Language: en-US
Newsgroups: comp.lang.fortran
References: <t53752$d0s$1@gioia.aioe.org>
From: nospam@nowhere.org (Ron Shepard)
In-Reply-To: <t53752$d0s$1@gioia.aioe.org>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Lines: 70
Message-ID: <4vbdK.242$7%M9.231@fx12.iad>
X-Complaints-To: abuse@easynews.com
Organization: Forte - www.forteinc.com
X-Complaints-Info: Please be sure to forward a copy of ALL headers otherwise we will be unable to process your complaint properly.
Date: Fri, 6 May 2022 10:52:32 -0500
X-Received-Bytes: 3514
 by: Ron Shepard - Fri, 6 May 2022 15:52 UTC

On 5/6/22 8:17 AM, Ev. Drikos wrote:
>
> Hello,
>
> Currently, my attention is on Legacy code, DEC/VMS.
> IMOH, the results I see seem to be confusing. Maybe
> it's my fault or GNU Fortran after version 8 gives
> different results or what else?.
>
> Results from other compilers that support DEC/VMS
> extensions will be appreciated!
>
> Thanks,
> Ev. Drikos
>
> --------------------------------------------------
>
> $ gfc -ffixed-form par.f && ./a.out
>   parameters=   2.00000000
> $ gfc -ffree-form par.f && ./a.out
>   parameters=   2.00000000
> $ gfc --version 2>&1 | head  -n1
>   GNU Fortran (GCC) 4.8.5

Gfortran has always been an f90 compiler, so PARAMETERS is being
interpreted as an implicitly typed real variable. The first line is an
executable statement assigning the value of 2.0 to that variable. The
code is interpreted the same way in both fixed form and free form.
>
> $ gfortran8 -fdec -ffixed-form par.f && ./a.out
>   parameters=   2.80259693E-45
> $ gfortran8 -fdec -ffree-form par.f && ./a.out
>   parameters=   2.80259693E-45
> $ gfortran8 --version 2>&1 | head  -n1
>   GNU Fortran (GCC) 8.4.0

Ignoring the lower case code for the moment, the f77 DEC extensions
include two things, an ambiguous form of the parameter statement and
also variables longer than 6 characters. Both of those extensions come
into play here. the code is being interpreted as if it were

parameter (S = 2.0)
print *, 'parameters=', parameters

The first line is the parameter declaration of the implicitly typed real
variable S, which is then never referenced. The last line is printing
the value of the implicitly typed real variable PARAMETERS, which is
undefined.

>
> $ cat par.f
>       parameters = 2.0
>       print *, 'parameters=', parameters
>       end

Since this is ambiguous syntax, I do not know how other f77 compilers
with VAX extensions would treat this code. I don't even know what a VAX
fortran compiler would do with those extensions enabled. If those
extensions are not enabled, then both lines should trigger compiler
warnings about the long variable name PARAMETERS.

As for the lower case code, that is allowed in f90+ and its behavior
defined, but it was ambiguous in f77, and different compilers did
different things. Some people argue that it was a language extension,
others argue that it was part of the source code interpretation and
processing that was explicitly excluded from consideration by the
standard document.

$.02 -Ron Shepard

Re: What results this legacy code should give?

<af9e60d5-262f-440f-bb8d-d8e3c22c9d53n@googlegroups.com>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=2220&group=comp.lang.fortran#2220

  copy link   Newsgroups: comp.lang.fortran
X-Received: by 2002:a37:ac13:0:b0:69f:c370:1784 with SMTP id e19-20020a37ac13000000b0069fc3701784mr2840616qkm.459.1651852482666;
Fri, 06 May 2022 08:54:42 -0700 (PDT)
X-Received: by 2002:a81:4e8f:0:b0:2f6:27c4:9bef with SMTP id
c137-20020a814e8f000000b002f627c49befmr3391220ywb.288.1651852482492; Fri, 06
May 2022 08:54:42 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!proxad.net!feeder1-2.proxad.net!209.85.160.216.MISMATCH!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.fortran
Date: Fri, 6 May 2022 08:54:42 -0700 (PDT)
In-Reply-To: <997fe062-044b-4f40-8324-ae14542ee6acn@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=2601:546:300:4c20:ec9e:646:6f27:29a0;
posting-account=7tVJUQoAAACymEG6aShD5R0lhHCm_A0r
NNTP-Posting-Host: 2601:546:300:4c20:ec9e:646:6f27:29a0
References: <t53752$d0s$1@gioia.aioe.org> <997fe062-044b-4f40-8324-ae14542ee6acn@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <af9e60d5-262f-440f-bb8d-d8e3c22c9d53n@googlegroups.com>
Subject: Re: What results this legacy code should give?
From: urbanjost@comcast.net (John)
Injection-Date: Fri, 06 May 2022 15:54:42 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
 by: John - Fri, 6 May 2022 15:54 UTC

You nailed it. The program is a DEC extension that allows for a PARAMETER statement to be indistinguishable from a variable declaration,
so if you force standards compliance the problem goes away. That little example is a true classic. Of course, fixed-format has to start with six spaces, but because so many compilers allow DEC extensions it causes problems with just about everyone. As Arjen notes, it is only a problem with fixed format, and only a problem if the compiler supports the non-standard "PARAMETER S=2.0", as the standard requires
"PARAMETER (S=2.0)"; so changing the name of the variable to something like PARMS or using free-format; or (hopefully) turning on standards conformance should solve it. You already solved the problem, but I was curious what some other compilers would do, and that was asked:buga.f:
parameters = 2.0
print *, 's=', s
print *, 'parameters=', parameters
end
$ ifort buga.f
$ ./a.out
s= 2.000000
parameters= 0.0000000E+00
$ nvfortran buga.f
$ ./a.out
s= 2.000000
parameters= 0.000000
$ ifort buga.f
$ ./a.out
s= 2.000000
parameters= 0.0000000E+00
$ gfortran buga.f
buga.f:1:16:
1 | parameters = 2.0
| 1
Warning: Legacy Extension: PARAMETER without '()' at (1)
$ ./a.out
s= 2.00000000
parameters= -5.24052938E+36
$ gfortran -std=f2018 buga.f
$ ./a.out
s= -457056.000
parameters= 2.00000000

I sort of "like" this bug

Re: What results this legacy code should give?

<64e1a48c-b331-4e26-bf43-7607ae61e8d5n@googlegroups.com>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=2224&group=comp.lang.fortran#2224

  copy link   Newsgroups: comp.lang.fortran
X-Received: by 2002:a05:620a:4144:b0:6a0:11c5:a12e with SMTP id k4-20020a05620a414400b006a011c5a12emr3008272qko.53.1651854591194;
Fri, 06 May 2022 09:29:51 -0700 (PDT)
X-Received: by 2002:a81:9b84:0:b0:2f7:bf1c:c233 with SMTP id
s126-20020a819b84000000b002f7bf1cc233mr3296244ywg.345.1651854591034; Fri, 06
May 2022 09:29:51 -0700 (PDT)
Path: i2pn2.org!i2pn.org!aioe.org!news.mixmin.net!proxad.net!feeder1-2.proxad.net!209.85.160.216.MISMATCH!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.fortran
Date: Fri, 6 May 2022 09:29:50 -0700 (PDT)
In-Reply-To: <af9e60d5-262f-440f-bb8d-d8e3c22c9d53n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=2601:546:300:4c20:ec9e:646:6f27:29a0;
posting-account=7tVJUQoAAACymEG6aShD5R0lhHCm_A0r
NNTP-Posting-Host: 2601:546:300:4c20:ec9e:646:6f27:29a0
References: <t53752$d0s$1@gioia.aioe.org> <997fe062-044b-4f40-8324-ae14542ee6acn@googlegroups.com>
<af9e60d5-262f-440f-bb8d-d8e3c22c9d53n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <64e1a48c-b331-4e26-bf43-7607ae61e8d5n@googlegroups.com>
Subject: Re: What results this legacy code should give?
From: urbanjost@comcast.net (John)
Injection-Date: Fri, 06 May 2022 16:29:51 +0000
Content-Type: text/plain; charset="UTF-8"
 by: John - Fri, 6 May 2022 16:29 UTC

> real :: parameters
x=10
parameters = 2.0
print *, 's=', s
print *, 'parameters=', parameters
end

> I sort of "like" this bug

For something that short to be so surprising is interesting; some compilers even have problems with the above. Note to self: do not start a variable name with "parameter". :>

Re: What results this legacy code should give?

<f0e4b3f5-6816-4f86-93fd-0e79af4980dbn@googlegroups.com>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=2226&group=comp.lang.fortran#2226

  copy link   Newsgroups: comp.lang.fortran
X-Received: by 2002:a05:6214:400e:b0:45a:ebbc:73 with SMTP id kd14-20020a056214400e00b0045aebbc0073mr3398317qvb.7.1651880584905;
Fri, 06 May 2022 16:43:04 -0700 (PDT)
X-Received: by 2002:a25:31c2:0:b0:641:660f:230f with SMTP id
x185-20020a2531c2000000b00641660f230fmr4315772ybx.472.1651880584730; Fri, 06
May 2022 16:43:04 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!proxad.net!feeder1-2.proxad.net!209.85.160.216.MISMATCH!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.fortran
Date: Fri, 6 May 2022 16:43:04 -0700 (PDT)
In-Reply-To: <t53752$d0s$1@gioia.aioe.org>
Injection-Info: google-groups.googlegroups.com; posting-host=202.67.103.232; posting-account=S_MdrwoAAAD7T2pxG2e393dk6y0tc0Le
NNTP-Posting-Host: 202.67.103.232
References: <t53752$d0s$1@gioia.aioe.org>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <f0e4b3f5-6816-4f86-93fd-0e79af4980dbn@googlegroups.com>
Subject: Re: What results this legacy code should give?
From: robin.vowels@gmail.com (Robin Vowels)
Injection-Date: Fri, 06 May 2022 23:43:04 +0000
Content-Type: text/plain; charset="UTF-8"
 by: Robin Vowels - Fri, 6 May 2022 23:43 UTC

On Friday, May 6, 2022 at 11:17:26 PM UTC+10, Ev. Drikos wrote:
> Hello,
>
> Currently, my attention is on Legacy code, DEC/VMS.
> IMOH, the results I see seem to be confusing. Maybe
> it's my fault or GNU Fortran after version 8 gives
> different results or what else?.
>
> Results from other compilers that support DEC/VMS
> extensions will be appreciated!
>
> Thanks,
> Ev. Drikos
>
> --------------------------------------------------
>
> $ gfc -ffixed-form par.f && ./a.out
> parameters= 2.00000000
> $ gfc -ffree-form par.f && ./a.out
> parameters= 2.00000000
> $ gfc --version 2>&1 | head -n1
> GNU Fortran (GCC) 4.8.5
>
> $ gfortran8 -fdec -ffixed-form par.f && ./a.out
> parameters= 2.80259693E-45
> $ gfortran8 -fdec -ffree-form par.f && ./a.out
> parameters= 2.80259693E-45
> $ gfortran8 --version 2>&1 | head -n1
> GNU Fortran (GCC) 8.4.0
>
> $ cat par.f
> parameters = 2.0
> print *, 'parameters=', parameters
> end

Use IMPLICIT NONE

Re: What results this legacy code should give?

<t55ltj$abt$1@gioia.aioe.org>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=2228&group=comp.lang.fortran#2228

  copy link   Newsgroups: comp.lang.fortran
Path: i2pn2.org!i2pn.org!aioe.org!X/w20U5ZeDM4V/N8TCJNtg.user.46.165.242.91.POSTED!not-for-mail
From: drikosev@gmail.com (Ev. Drikos)
Newsgroups: comp.lang.fortran
Subject: Re: What results this legacy code should give?
Date: Sat, 7 May 2022 14:41:37 +0300
Organization: Aioe.org NNTP Server
Message-ID: <t55ltj$abt$1@gioia.aioe.org>
References: <t53752$d0s$1@gioia.aioe.org>
<997fe062-044b-4f40-8324-ae14542ee6acn@googlegroups.com>
<af9e60d5-262f-440f-bb8d-d8e3c22c9d53n@googlegroups.com>
<64e1a48c-b331-4e26-bf43-7607ae61e8d5n@googlegroups.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Info: gioia.aioe.org; logging-data="10621"; posting-host="X/w20U5ZeDM4V/N8TCJNtg.user.gioia.aioe.org"; mail-complaints-to="abuse@aioe.org";
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:78.0)
Gecko/20100101 Thunderbird/78.5.1
Content-Language: en-US
X-Notice: Filtered by postfilter v. 0.9.2
X-Mozilla-News-Host: news://news.aioe.org
 by: Ev. Drikos - Sat, 7 May 2022 11:41 UTC

On 06/05/2022 19:29, John wrote:
>
>> real :: parameters
> x=10
> parameters = 2.0
> print *, 's=', s
> print *, 'parameters=', parameters
> end
>
>> I sort of "like" this bug
>
> For something that short to be so surprising is interesting; some compilers even have problems with the above ...

Implementing it in a LALR based parser is also tricky (gfortran is RD).

All the replies were very helpful and here is what I've understood or
better what a Fortran developer may expect or much better what finally
worked in my case.

With '-fno-dec' or '-ffree-form' I'd expect an assignment. Whereas, a
legacy PARAMETER statement in fixed form could require ie '-fdec'. The
option '-std=f2018' as supported by gfortran is of course good enough.

Thanks everyone
Ev. Drikos

----------------------------------------------------------------------

my own tokenization test with my own tool 'fcheck'
(the script below run only the 1st example shown)

miniserver:names suser$ ./test.sh
________________________
correct = 1
expected = 1
unexpected = 0
________________________
erroneous = 0
expected = 0
unexpected = 0
________________________
miniserver:names suser$ cat par-1.f
! name-l PARAMETERS
1 parameters=1.0
2 end

miniserver:names suser$ fcheck par-1.f -debug
Line=00002,65588 label buffer=[1]
Line=00002,66106 name-l buffer=[PARAMETERS]
Line=00002,00061 = buffer=[=]
Line=00002,65674 real-literal-constant buffer=[1.0]
Line=00002,65800 ; buffer=[\r]
Line=00003,65588 label buffer=[2]
Line=00003,65570 END buffer=[END]
Line=00003,65800 ; buffer=[\r]
Line=00003,-0001 EOF buffer=[]
miniserver:names suser$ fcheck -fdec par-1.f -debug
Line=00002,65588 label buffer=[1]
Line=00002,65673 PARAMETER buffer=[PARAMETER]
Line=00002,66106 name-l buffer=[S]
Line=00002,00061 = buffer=[=]
Line=00002,65674 real-literal-constant buffer=[1.0]
Line=00002,65800 ; buffer=[\r]
Line=00003,65588 label buffer=[2]
Line=00003,65570 END buffer=[END]
Line=00003,65800 ; buffer=[\r]
Line=00003,-0001 EOF buffer=[]
miniserver:names suser$ fcheck -ffree-form -fdec par-1.f -debug
Line=00002,65588 label buffer=[1]
Line=00002,66106 name-l buffer=[PARAMETERS]
Line=00002,00061 = buffer=[=]
Line=00002,65674 real-literal-constant buffer=[1.0]
Line=00002,65800 ; buffer=[\r]
Line=00003,65588 label buffer=[2]
Line=00003,65570 END buffer=[END]
Line=00003,65800 ; buffer=[\r]
Line=00004,-0001 EOF buffer=[]
miniserver:names suser$

Re: What results this legacy code should give?

<jdndioFbqqvU1@mid.individual.net>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=2229&group=comp.lang.fortran#2229

  copy link   Newsgroups: comp.lang.fortran
Path: i2pn2.org!i2pn.org!news.swapon.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From: steve@seesignature.invalid (Steve Lionel)
Newsgroups: comp.lang.fortran
Subject: Re: What results this legacy code should give?
Date: Sat, 7 May 2022 10:21:12 -0400
Lines: 28
Message-ID: <jdndioFbqqvU1@mid.individual.net>
References: <t53752$d0s$1@gioia.aioe.org> <4vbdK.242$7%M9.231@fx12.iad>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Trace: individual.net y5uxsfJSFMq6wfIjUcL22ArODxcngbvpwIFf1/LR9K4YWVAolp
Cancel-Lock: sha1:bECVVCGi/B4eq9KSvNWIfbhMCtk=
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101
Thunderbird/91.9.0
Content-Language: en-US
In-Reply-To: <4vbdK.242$7%M9.231@fx12.iad>
 by: Steve Lionel - Sat, 7 May 2022 14:21 UTC

On 5/6/2022 11:52 AM, Ron Shepard wrote:
>>
>> $ cat par.f
>>        parameters = 2.0
>>        print *, 'parameters=', parameters
>>        end
>
> Since this is ambiguous syntax, I do not know how other f77 compilers
> with VAX extensions would treat this code. I don't even know what a VAX
> fortran compiler would do with those extensions enabled. If those
> extensions are not enabled, then both lines should trigger compiler
> warnings about the long variable name PARAMETERS.

The no-parenthesis PARAMETER syntax was part of the FORTRAN-77 draft
right up until the published standard. DEC went ahead and implemented
it, assuming it would be part of the final standard. When it wasn't,
they had to support both. It is really more a lesson in the danger of
fixed-form.

--
Steve Lionel
ISO/IEC JTC1/SC22/WG5 (Fortran) Convenor
Retired Intel Fortran developer/support
Email: firstname at firstnamelastname dot com
Twitter: @DoctorFortran
LinkedIn: https://www.linkedin.com/in/stevelionel
Blog: https://stevelionel.com/drfortran
WG5: https://wg5-fortran.org

Re: What results this legacy code should give?

<t560g3$fpb$1@newsreader4.netcologne.de>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=2230&group=comp.lang.fortran#2230

  copy link   Newsgroups: comp.lang.fortran
Path: i2pn2.org!i2pn.org!aioe.org!news.uzoreto.com!newsreader4.netcologne.de!news.netcologne.de!.POSTED.2001-4dd6-ee5-0-7285-c2ff-fe6c-992d.ipv6dyn.netcologne.de!not-for-mail
From: tkoenig@netcologne.de (Thomas Koenig)
Newsgroups: comp.lang.fortran
Subject: Re: What results this legacy code should give?
Date: Sat, 7 May 2022 14:42:11 -0000 (UTC)
Organization: news.netcologne.de
Distribution: world
Message-ID: <t560g3$fpb$1@newsreader4.netcologne.de>
References: <t53752$d0s$1@gioia.aioe.org> <4vbdK.242$7%M9.231@fx12.iad>
<jdndioFbqqvU1@mid.individual.net>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Injection-Date: Sat, 7 May 2022 14:42:11 -0000 (UTC)
Injection-Info: newsreader4.netcologne.de; posting-host="2001-4dd6-ee5-0-7285-c2ff-fe6c-992d.ipv6dyn.netcologne.de:2001:4dd6:ee5:0:7285:c2ff:fe6c:992d";
logging-data="16171"; mail-complaints-to="abuse@netcologne.de"
User-Agent: slrn/1.0.3 (Linux)
 by: Thomas Koenig - Sat, 7 May 2022 14:42 UTC

Steve Lionel <steve@seesignature.invalid> schrieb:
> On 5/6/2022 11:52 AM, Ron Shepard wrote:
>>>
>>> $ cat par.f
>>>        parameters = 2.0
>>>        print *, 'parameters=', parameters
>>>        end
>>
>> Since this is ambiguous syntax, I do not know how other f77 compilers
>> with VAX extensions would treat this code. I don't even know what a VAX
>> fortran compiler would do with those extensions enabled. If those
>> extensions are not enabled, then both lines should trigger compiler
>> warnings about the long variable name PARAMETERS.
>
> The no-parenthesis PARAMETER syntax was part of the FORTRAN-77 draft
> right up until the published standard. DEC went ahead and implemented
> it, assuming it would be part of the final standard. When it wasn't,
> they had to support both. It is really more a lesson in the danger of
> fixed-form.

.... and of not using IMPLICIT NONE, of course.

Free form still has two important advantages: It is possible to use
British English spelling, as in

PROGRAMME MAIN

and it is possible to group numbers, as in

N = 123 234 567

(although the latter could probably be added to free form, as
well). Being able to write

ELSE IF (A) = 23.

is of lesser importance, I guess.

Re: What results this legacy code should give?

<i0xdK.9778$gc62.7492@fx45.iad>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=2231&group=comp.lang.fortran#2231

  copy link   Newsgroups: comp.lang.fortran
Path: i2pn2.org!i2pn.org!aioe.org!news.uzoreto.com!feeder.usenetexpress.com!tr3.eu1.usenetexpress.com!feeder1.feed.usenet.farm!feed.usenet.farm!peer03.ams4!peer.am4.highwinds-media.com!peer02.iad!feed-me.highwinds-media.com!news.highwinds-media.com!fx45.iad.POSTED!not-for-mail
MIME-Version: 1.0
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:91.0) Gecko/20100101 Thunderbird/91.9.0
Subject: Re: What results this legacy code should give?
Content-Language: en-US
Newsgroups: comp.lang.fortran
References: <t53752$d0s$1@gioia.aioe.org> <4vbdK.242$7%M9.231@fx12.iad> <jdndioFbqqvU1@mid.individual.net> <t560g3$fpb$1@newsreader4.netcologne.de>
From: nospam@nowhere.org (Ron Shepard)
In-Reply-To: <t560g3$fpb$1@newsreader4.netcologne.de>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Lines: 55
Message-ID: <i0xdK.9778$gc62.7492@fx45.iad>
X-Complaints-To: abuse@easynews.com
Organization: Forte - www.forteinc.com
X-Complaints-Info: Please be sure to forward a copy of ALL headers otherwise we will be unable to process your complaint properly.
Date: Sat, 7 May 2022 11:21:34 -0500
X-Received-Bytes: 3459
 by: Ron Shepard - Sat, 7 May 2022 16:21 UTC

On 5/7/22 9:42 AM, Thomas Koenig wrote:
> Steve Lionel <steve@seesignature.invalid> schrieb:
>> On 5/6/2022 11:52 AM, Ron Shepard wrote:
>>>>
>>>> $ cat par.f
>>>>        parameters = 2.0
>>>>        print *, 'parameters=', parameters
>>>>        end
>>>
>>> Since this is ambiguous syntax, I do not know how other f77 compilers
>>> with VAX extensions would treat this code. I don't even know what a VAX
>>> fortran compiler would do with those extensions enabled. If those
>>> extensions are not enabled, then both lines should trigger compiler
>>> warnings about the long variable name PARAMETERS.
>>
>> The no-parenthesis PARAMETER syntax was part of the FORTRAN-77 draft
>> right up until the published standard. DEC went ahead and implemented
>> it, assuming it would be part of the final standard. When it wasn't,
>> they had to support both. It is really more a lesson in the danger of
>> fixed-form.
>
> ... and of not using IMPLICIT NONE, of course.

This has been mentioned a couple of times now in this thread, and just
as a reminder IMPLICIT NONE was not part of standard fortran until f90.
So if one wanted to write standard code in the 1980s, this was not an
option.

On the other hand, as I've stated before, if you wanted to do something
useful and nontrivial, or if you were concerned about portability of the
code, you were almost required to use extensions to the language. F77 by
itself was just missing too much functionality. Vendors at that time
were happy with that situation because it allowed them to lock in their
customers who relied on their extensions. IMPLICIT NONE was one of those
useful extensions -- portable but nonstandard in that case.

>
> Free form still has two important advantages: It is possible to use
> British English spelling, as in
>
> PROGRAMME MAIN
>
> and it is possible to group numbers, as in
>
> N = 123 234 567

This is actually something that I miss in the language. In f77, I would
routinely specify real constants such as pi with 30 to 40 digits, just
to make it easier in the future if I ever wanted to change the code to
some kind of extended precision. When I started this, I typed in the
digits by hand, so it was handy to put some spaces in the constants
every 3 or every 5 digits to make them easier to verify and for a future
programmer to read.

$.02 -Ron Shepard

Re: What results this legacy code should give?

<9a328d18-5e3d-466d-870f-6503970b2db8n@googlegroups.com>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=2232&group=comp.lang.fortran#2232

  copy link   Newsgroups: comp.lang.fortran
X-Received: by 2002:a05:6214:300d:b0:459:2bb:6d14 with SMTP id ke13-20020a056214300d00b0045902bb6d14mr7880969qvb.71.1651953407631;
Sat, 07 May 2022 12:56:47 -0700 (PDT)
X-Received: by 2002:a25:59c4:0:b0:645:7d91:db7b with SMTP id
n187-20020a2559c4000000b006457d91db7bmr6883107ybb.273.1651953407448; Sat, 07
May 2022 12:56:47 -0700 (PDT)
Path: i2pn2.org!i2pn.org!aioe.org!news.mixmin.net!proxad.net!feeder1-2.proxad.net!209.85.160.216.MISMATCH!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.fortran
Date: Sat, 7 May 2022 12:56:47 -0700 (PDT)
In-Reply-To: <i0xdK.9778$gc62.7492@fx45.iad>
Injection-Info: google-groups.googlegroups.com; posting-host=75.37.192.241; posting-account=gLDX1AkAAAA26M5HM-O3sVMAXdxK9FPA
NNTP-Posting-Host: 75.37.192.241
References: <t53752$d0s$1@gioia.aioe.org> <4vbdK.242$7%M9.231@fx12.iad>
<jdndioFbqqvU1@mid.individual.net> <t560g3$fpb$1@newsreader4.netcologne.de> <i0xdK.9778$gc62.7492@fx45.iad>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <9a328d18-5e3d-466d-870f-6503970b2db8n@googlegroups.com>
Subject: Re: What results this legacy code should give?
From: gah4@u.washington.edu (gah4)
Injection-Date: Sat, 07 May 2022 19:56:47 +0000
Content-Type: text/plain; charset="UTF-8"
 by: gah4 - Sat, 7 May 2022 19:56 UTC

On Saturday, May 7, 2022 at 9:21:39 AM UTC-7, Ron Shepard wrote:

(snip)

> > ... and of not using IMPLICIT NONE, of course.

> This has been mentioned a couple of times now in this thread, and just
> as a reminder IMPLICIT NONE was not part of standard fortran until f90.
> So if one wanted to write standard code in the 1980s, this was not an
> option.

I remember stories about some using:

IMPLICIT LOGICAL (A-$)

and then the compiler (unless it has other extensions) will complain
about the use of LOGICAL variables.

Or printing them would give a T or F, and not a number left over in
the variable.

Re: What results this legacy code should give?

<t56jui$nff$1@dont-email.me>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=2233&group=comp.lang.fortran#2233

  copy link   Newsgroups: comp.lang.fortran
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: garylscott@sbcglobal.net (Gary Scott)
Newsgroups: comp.lang.fortran
Subject: Re: What results this legacy code should give?
Date: Sat, 7 May 2022 15:14:08 -0500
Organization: A noiseless patient Spider
Lines: 48
Message-ID: <t56jui$nff$1@dont-email.me>
References: <t53752$d0s$1@gioia.aioe.org> <4vbdK.242$7%M9.231@fx12.iad>
<jdndioFbqqvU1@mid.individual.net> <t560g3$fpb$1@newsreader4.netcologne.de>
<i0xdK.9778$gc62.7492@fx45.iad>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Sat, 7 May 2022 20:14:10 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="123026dc3db0cb24dc88f23a218360a5";
logging-data="24047"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/gF3kslueHHpCJ1EpsqR1Pkcv/l6/UZ0Q="
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101
Thunderbird/91.9.0
Cancel-Lock: sha1:RmWzc1Y48Fq54A61bTIdspgoceY=
In-Reply-To: <i0xdK.9778$gc62.7492@fx45.iad>
Content-Language: en-US
 by: Gary Scott - Sat, 7 May 2022 20:14 UTC

On 5/7/2022 11:21 AM, Ron Shepard wrote:
> On 5/7/22 9:42 AM, Thomas Koenig wrote:
>> Steve Lionel <steve@seesignature.invalid> schrieb:
>>> On 5/6/2022 11:52 AM, Ron Shepard wrote:
>>>>>
>>>>> $ cat par.f
>>>>>         parameters = 2.0
>>>>>         print *, 'parameters=', parameters
>>>>>         end
>>>>
>>>> Since this is ambiguous syntax, I do not know how other f77 compilers
>>>> with VAX extensions would treat this code. I don't even know what a VAX
>>>> fortran compiler would do with those extensions enabled. If those
>>>> extensions are not enabled, then both lines should trigger compiler
>>>> warnings about the long variable name PARAMETERS.
>>>
>>> The no-parenthesis PARAMETER syntax was part of the FORTRAN-77 draft
>>> right up until the published standard. DEC went ahead and implemented
>>> it, assuming it would be part of the final standard. When it wasn't,
>>> they had to support both. It is really more a lesson in the danger of
>>> fixed-form.
>>
>> ... and of not using IMPLICIT NONE, of course.
>
> This has been mentioned a couple of times now in this thread, and just
> as a reminder IMPLICIT NONE was not part of standard fortran until f90.
> So if one wanted to write standard code in the 1980s, this was not an
> option.
>
> On the other hand, as I've stated before, if you wanted to do something
> useful and nontrivial, or if you were concerned about portability of the
> code, you were almost required to use extensions to the language. F77 by
> itself was just missing too much functionality. Vendors at that time
> were happy with that situation because it allowed them to lock in their
> customers who relied on their extensions. IMPLICIT NONE was one of those
> useful extensions -- portable but nonstandard in that case.

But we still don't have a lot of those necessary extensions, still
having to use extensions. Like mechanisms to access shared memory areas
across processes and hardware. Ability to create and/or initiate other
processes and threads. All of those critical things require extensions
or OS API calls or 3rd party API calls. There's just so much missing
still. Coarrays largely miss the point of greatest need.

snip
>
> $.02 -Ron Shepard

Re: What results this legacy code should give?

<t56tfm$u2s$1@newsreader4.netcologne.de>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=2234&group=comp.lang.fortran#2234

  copy link   Newsgroups: comp.lang.fortran
Path: i2pn2.org!i2pn.org!aioe.org!news.uzoreto.com!newsreader4.netcologne.de!news.netcologne.de!.POSTED.2001-4dd6-ee5-0-7285-c2ff-fe6c-992d.ipv6dyn.netcologne.de!not-for-mail
From: tkoenig@netcologne.de (Thomas Koenig)
Newsgroups: comp.lang.fortran
Subject: Re: What results this legacy code should give?
Date: Sat, 7 May 2022 22:56:54 -0000 (UTC)
Organization: news.netcologne.de
Distribution: world
Message-ID: <t56tfm$u2s$1@newsreader4.netcologne.de>
References: <t53752$d0s$1@gioia.aioe.org> <4vbdK.242$7%M9.231@fx12.iad>
<jdndioFbqqvU1@mid.individual.net> <t560g3$fpb$1@newsreader4.netcologne.de>
<i0xdK.9778$gc62.7492@fx45.iad>
<9a328d18-5e3d-466d-870f-6503970b2db8n@googlegroups.com>
Injection-Date: Sat, 7 May 2022 22:56:54 -0000 (UTC)
Injection-Info: newsreader4.netcologne.de; posting-host="2001-4dd6-ee5-0-7285-c2ff-fe6c-992d.ipv6dyn.netcologne.de:2001:4dd6:ee5:0:7285:c2ff:fe6c:992d";
logging-data="30812"; mail-complaints-to="abuse@netcologne.de"
User-Agent: slrn/1.0.3 (Linux)
 by: Thomas Koenig - Sat, 7 May 2022 22:56 UTC

gah4 <gah4@u.washington.edu> schrieb:
> On Saturday, May 7, 2022 at 9:21:39 AM UTC-7, Ron Shepard wrote:
>
> (snip)
>
>> > ... and of not using IMPLICIT NONE, of course.
>
>> This has been mentioned a couple of times now in this thread, and just
>> as a reminder IMPLICIT NONE was not part of standard fortran until f90.
>> So if one wanted to write standard code in the 1980s, this was not an
>> option.
>
> I remember stories about some using:
>
> IMPLICIT LOGICAL (A-$)
>
> and then the compiler (unless it has other extensions) will complain
> about the use of LOGICAL variables.

I used to use

IMPLICT CHARACTER*1 (A-Z)

which caught many, if not all, errors. Inventing a variable name
in a subroutine argument was not caught this way, for example.

Having Toolpack and, later, ftnchek also helped a lot.

Re: What results this legacy code should give?

<t579o0$c0p$1@dont-email.me>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=2235&group=comp.lang.fortran#2235

  copy link   Newsgroups: comp.lang.fortran
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: not_valid@comcast.net (James Van Buskirk)
Newsgroups: comp.lang.fortran
Subject: Re: What results this legacy code should give?
Date: Sat, 7 May 2022 20:25:12 -0600
Organization: A noiseless patient Spider
Lines: 1
Message-ID: <t579o0$c0p$1@dont-email.me>
References: <t53752$d0s$1@gioia.aioe.org> <4vbdK.242$7%M9.231@fx12.iad> <jdndioFbqqvU1@mid.individual.net> <t560g3$fpb$1@newsreader4.netcologne.de> <i0xdK.9778$gc62.7492@fx45.iad> <9a328d18-5e3d-466d-870f-6503970b2db8n@googlegroups.com> <t56tfm$u2s$1@newsreader4.netcologne.de>
MIME-Version: 1.0
Content-Type: text/plain;
format=flowed;
charset="Windows-1252";
reply-type=original
Content-Transfer-Encoding: 7bit
Injection-Date: Sun, 8 May 2022 02:26:08 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="8c872508bb1234638b8b0ee1ce92c1df";
logging-data="12313"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/q+4MMOeTmfTTKldkDJRebf1672EzBkQM="
Cancel-Lock: sha1:xDn5NltMfZRu19fGfHzCxXz9S3U=
X-MimeOLE: Produced By Microsoft MimeOLE V16.4.3528.331
In-Reply-To: <t56tfm$u2s$1@newsreader4.netcologne.de>
X-Newsreader: Microsoft Windows Live Mail 16.4.3528.331
Importance: Normal
X-Priority: 3
X-MSMail-Priority: Normal
 by: James Van Buskirk - Sun, 8 May 2022 02:25 UTC

"Thomas Koenig" wrote in message
news:t56tfm$u2s$1@newsreader4.netcologne.de...

> I used to use

> IMPLICT CHARACTER*1 (A-Z)

> which caught many, if not all, errors. Inventing a variable name
> in a subroutine argument was not caught this way, for example.

Wouldn't
IMPLICIT CHARACTER*(*) (A-Z)
have caught a couple more errors?

Re: What results this legacy code should give?

<t57s08$e90$1@newsreader4.netcologne.de>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=2236&group=comp.lang.fortran#2236

  copy link   Newsgroups: comp.lang.fortran
Path: i2pn2.org!i2pn.org!usenet.goja.nl.eu.org!news.freedyn.de!newsreader4.netcologne.de!news.netcologne.de!.POSTED.2001-4dd6-ee5-0-7285-c2ff-fe6c-992d.ipv6dyn.netcologne.de!not-for-mail
From: tkoenig@netcologne.de (Thomas Koenig)
Newsgroups: comp.lang.fortran
Subject: Re: What results this legacy code should give?
Date: Sun, 8 May 2022 07:37:44 -0000 (UTC)
Organization: news.netcologne.de
Distribution: world
Message-ID: <t57s08$e90$1@newsreader4.netcologne.de>
References: <t53752$d0s$1@gioia.aioe.org> <4vbdK.242$7%M9.231@fx12.iad>
<jdndioFbqqvU1@mid.individual.net> <t560g3$fpb$1@newsreader4.netcologne.de>
<i0xdK.9778$gc62.7492@fx45.iad>
<9a328d18-5e3d-466d-870f-6503970b2db8n@googlegroups.com>
<t56tfm$u2s$1@newsreader4.netcologne.de> <t579o0$c0p$1@dont-email.me>
Injection-Date: Sun, 8 May 2022 07:37:44 -0000 (UTC)
Injection-Info: newsreader4.netcologne.de; posting-host="2001-4dd6-ee5-0-7285-c2ff-fe6c-992d.ipv6dyn.netcologne.de:2001:4dd6:ee5:0:7285:c2ff:fe6c:992d";
logging-data="14624"; mail-complaints-to="abuse@netcologne.de"
User-Agent: slrn/1.0.3 (Linux)
 by: Thomas Koenig - Sun, 8 May 2022 07:37 UTC

James Van Buskirk <not_valid@comcast.net> schrieb:
> "Thomas Koenig" wrote in message
> news:t56tfm$u2s$1@newsreader4.netcologne.de...
>
>> I used to use
>
>> IMPLICT CHARACTER*1 (A-Z)
>
>> which caught many, if not all, errors. Inventing a variable name
>> in a subroutine argument was not caught this way, for example.
>
> Wouldn't
> IMPLICIT CHARACTER*(*) (A-Z)
> have caught a couple more errors?

Possibly, but the people who wrote up the advice at the time
didn't think of it, and neither did I :-)

After I moved my development to UNIX-based Fortran compilers which
supported IMPLICIT NONE, the point became moot. f2c also supports
this, IIRC.

Re: What results this legacy code should give?

<98b4b036-49f5-49d4-9c85-5ceb2e3982e5n@googlegroups.com>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=2237&group=comp.lang.fortran#2237

  copy link   Newsgroups: comp.lang.fortran
X-Received: by 2002:a05:6214:b94:b0:456:38b2:2d76 with SMTP id fe20-20020a0562140b9400b0045638b22d76mr9642553qvb.70.1652015488560;
Sun, 08 May 2022 06:11:28 -0700 (PDT)
X-Received: by 2002:a81:8102:0:b0:2f8:f5fb:b805 with SMTP id
r2-20020a818102000000b002f8f5fbb805mr10220282ywf.128.1652015488356; Sun, 08
May 2022 06:11:28 -0700 (PDT)
Path: i2pn2.org!i2pn.org!aioe.org!news.mixmin.net!proxad.net!feeder1-2.proxad.net!209.85.160.216.MISMATCH!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.fortran
Date: Sun, 8 May 2022 06:11:28 -0700 (PDT)
In-Reply-To: <i0xdK.9778$gc62.7492@fx45.iad>
Injection-Info: google-groups.googlegroups.com; posting-host=173.49.135.235; posting-account=ZZXq9AoAAAAQEcA7zKAGm0UFQh4gMBv7
NNTP-Posting-Host: 173.49.135.235
References: <t53752$d0s$1@gioia.aioe.org> <4vbdK.242$7%M9.231@fx12.iad>
<jdndioFbqqvU1@mid.individual.net> <t560g3$fpb$1@newsreader4.netcologne.de> <i0xdK.9778$gc62.7492@fx45.iad>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <98b4b036-49f5-49d4-9c85-5ceb2e3982e5n@googlegroups.com>
Subject: Re: What results this legacy code should give?
From: parekhvs@gmail.com (FortranFan)
Injection-Date: Sun, 08 May 2022 13:11:28 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
 by: FortranFan - Sun, 8 May 2022 13:11 UTC

On Saturday, May 7, 2022 at 12:21:39 PM UTC-4, Ron Shepard wrote:

> .. a reminder IMPLICIT NONE was not part of standard fortran until f90.
> So if one wanted to write standard code in the 1980s, this was not an
> option ..

And that remains yet another unfortunate event in the history of Fortran.

ANSI X3.9-1978 document toward FORTRAN 77 was approved by ANSI on April 3, 1978 that became the de facto standard reference for FORTRAN 77.

Now consider MILITARY STANDARD 1753 FORTRAN, US DoD Supplement To American National Standard X3.9-1978 dated November 9, 1978, months later:
https://wg5-fortran.org/ARCHIVE/mil_std_1753.html

which introduced `IMPLICIT NONE` that was recognized as useful by many users at the time and which was then implemented by many compilers as an extension that became popular enough to make it into Fortran 90 revision, 13 years later.

If only `IMPLICIT NONE` had made into ANSI X3.9-1978 document itself, clearly the notion of `IMPLICIT NONE` must have been circulating given its appearance just months later in the MIL-STD 1753 document!

And if only Fortran 90 had instead made `IMPLICIT NONE` the default (the semantics of explicit everything), at least for all the new program scopes it introduced such as INTERFACEs and MODULEs! That is, as compromise at least given all the crazy battles that supposedly characterized Fortran standard revision during the 1980s :-(

That was some serious failure of imagination back then which handicapped the practice of Fortran.

Re: What results this legacy code should give?

<lVSdK.1986$7%M9.463@fx12.iad>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=2238&group=comp.lang.fortran#2238

  copy link   Newsgroups: comp.lang.fortran
Path: i2pn2.org!i2pn.org!aioe.org!news.uzoreto.com!feeder.usenetexpress.com!tr3.eu1.usenetexpress.com!81.171.65.13.MISMATCH!peer01.ams4!peer.am4.highwinds-media.com!peer01.iad!feed-me.highwinds-media.com!news.highwinds-media.com!fx12.iad.POSTED!not-for-mail
MIME-Version: 1.0
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:91.0) Gecko/20100101 Thunderbird/91.9.0
Subject: Re: What results this legacy code should give?
Content-Language: en-US
Newsgroups: comp.lang.fortran
References: <t53752$d0s$1@gioia.aioe.org> <4vbdK.242$7%M9.231@fx12.iad> <jdndioFbqqvU1@mid.individual.net> <t560g3$fpb$1@newsreader4.netcologne.de> <i0xdK.9778$gc62.7492@fx45.iad> <9a328d18-5e3d-466d-870f-6503970b2db8n@googlegroups.com> <t56tfm$u2s$1@newsreader4.netcologne.de> <t579o0$c0p$1@dont-email.me> <t57s08$e90$1@newsreader4.netcologne.de>
From: nospam@nowhere.org (Ron Shepard)
In-Reply-To: <t57s08$e90$1@newsreader4.netcologne.de>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Lines: 43
Message-ID: <lVSdK.1986$7%M9.463@fx12.iad>
X-Complaints-To: abuse@easynews.com
Organization: Forte - www.forteinc.com
X-Complaints-Info: Please be sure to forward a copy of ALL headers otherwise we will be unable to process your complaint properly.
Date: Sun, 8 May 2022 12:16:01 -0500
X-Received-Bytes: 3251
 by: Ron Shepard - Sun, 8 May 2022 17:16 UTC

On 5/8/22 2:37 AM, Thomas Koenig wrote:
> James Van Buskirk <not_valid@comcast.net> schrieb:
>> "Thomas Koenig" wrote in message
>> news:t56tfm$u2s$1@newsreader4.netcologne.de...
>>
>>> I used to use
>>
>>> IMPLICT CHARACTER*1 (A-Z)
>>
>>> which caught many, if not all, errors. Inventing a variable name
>>> in a subroutine argument was not caught this way, for example.
>>
>> Wouldn't
>> IMPLICIT CHARACTER*(*) (A-Z)
>> have caught a couple more errors?
>
> Possibly, but the people who wrote up the advice at the time
> didn't think of it, and neither did I :-)
>
> After I moved my development to UNIX-based Fortran compilers which
> supported IMPLICIT NONE, the point became moot. f2c also supports
> this, IIRC.

i also used implicit character declarations in my codes for a while as a
work-around for the lack of implicit none in f77. Then something strange
happened on a compiler. I was doing some bit-packing with shift(),
and(), or(), and so on (I forget now exactly which set of operators this
compiler supported), and the compiler treated the intermediate results
as the default character. This was an intermediate within an expression,
not an implicitly declared variable. You could use basically any other
type in the bit operators, integers, logicals, reals, they were all
allowed and they were all treated as just a string of bits, but
character arguments were not allowed. So a little piece of code that
worked successfully on a dozen other compilers with the implicit
character declaration raised an error on this particular compiler. I
think implicit none happened to work alright, so I switched to that and
everything was fine. I was already using nonstandard extensions in that
little subroutine anyway, so it wasn't a big deal at the time. But it
did show me how important it was to have all those little details
specified in the standard document. F90 compilers were still about a
decade away at that time.

$.02 -Ron Shepard

Re: What results this legacy code should give?

<mYTdK.4621$arR.2928@fx48.iad>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=2239&group=comp.lang.fortran#2239

  copy link   Newsgroups: comp.lang.fortran
Path: i2pn2.org!i2pn.org!usenet.goja.nl.eu.org!news.freedyn.de!newsreader4.netcologne.de!news.netcologne.de!news.uzoreto.com!npeer.as286.net!npeer-ng0.as286.net!peer03.ams1!peer.ams1.xlned.com!news.xlned.com!peer03.iad!feed-me.highwinds-media.com!news.highwinds-media.com!fx48.iad.POSTED!not-for-mail
MIME-Version: 1.0
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:91.0)
Gecko/20100101 Thunderbird/91.9.0
Subject: Re: What results this legacy code should give?
Content-Language: en-US
Newsgroups: comp.lang.fortran
References: <t53752$d0s$1@gioia.aioe.org> <4vbdK.242$7%M9.231@fx12.iad>
<jdndioFbqqvU1@mid.individual.net> <t560g3$fpb$1@newsreader4.netcologne.de>
<i0xdK.9778$gc62.7492@fx45.iad>
<98b4b036-49f5-49d4-9c85-5ceb2e3982e5n@googlegroups.com>
From: nospam@nowhere.org (Ron Shepard)
In-Reply-To: <98b4b036-49f5-49d4-9c85-5ceb2e3982e5n@googlegroups.com>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Lines: 76
Message-ID: <mYTdK.4621$arR.2928@fx48.iad>
X-Complaints-To: abuse@easynews.com
Organization: Forte - www.forteinc.com
X-Complaints-Info: Please be sure to forward a copy of ALL headers otherwise we will be unable to process your complaint properly.
Date: Sun, 8 May 2022 13:27:29 -0500
X-Received-Bytes: 5520
 by: Ron Shepard - Sun, 8 May 2022 18:27 UTC

On 5/8/22 8:11 AM, FortranFan wrote:
> On Saturday, May 7, 2022 at 12:21:39 PM UTC-4, Ron Shepard wrote:
>
>> .. a reminder IMPLICIT NONE was not part of standard fortran until f90.
>> So if one wanted to write standard code in the 1980s, this was not an
>> option ..
>
> And that remains yet another unfortunate event in the history of Fortran.
>
> ANSI X3.9-1978 document toward FORTRAN 77 was approved by ANSI on April 3, 1978 that became the de facto standard reference for FORTRAN 77.
>
> Now consider MILITARY STANDARD 1753 FORTRAN, US DoD Supplement To American National Standard X3.9-1978 dated November 9, 1978, months later:
> https://wg5-fortran.org/ARCHIVE/mil_std_1753.html
>
> which introduced `IMPLICIT NONE` that was recognized as useful by many users at the time and which was then implemented by many compilers as an extension that became popular enough to make it into Fortran 90 revision, 13 years later.

Yes, there were several useful extensions that were in the MIL-STD
document, including IMPLICIT NONE, INCLUDE, and the set of bit operators
that were all eventually included in f90.

I think most programmers were expecting a revision to the f77 standard
in the early 1980s that would have included the MIL-STD features plus
maybe a few more things that did not quite make it into f77.
Asynchronous I/O and conditional compilation (a preprocessor) were at
the top of my most-wanted list at that time. Then in the mid 1980s there
would have been a more substantial update of the language, perhaps
free-form source (to facilitate preprocessor use) would have made it at
that time -- I think those things, along with array syntax, were
included in the early fortran 8x drafts.

But all that never happened.

I continued to use vendor extensions for asynchronous i/o, and I wrote
my own conditional compilation utility (in fortran, of course).

In hindsight, the major benefit of f90 was modules and explicit
interfaces. I do not know when that functionality was adopted in the f8x
saga.

>
> If only `IMPLICIT NONE` had made into ANSI X3.9-1978 document itself, clearly the notion of `IMPLICIT NONE` must have been circulating given its appearance just months later in the MIL-STD 1753 document!

Yes, by the mid 1970s, well before f77 was adopted, IMPLICIT NONE was a
common f66 extension, and it was frequently used by programmers. I do
not understand why it did not make it into the f77 document.

>
> And if only Fortran 90 had instead made `IMPLICIT NONE` the default (the semantics of explicit everything), at least for all the new program scopes it introduced such as INTERFACEs and MODULEs! That is, as compromise at least given all the crazy battles that supposedly characterized Fortran standard revision during the 1980s :-(

One proposal was to make the default different for fixed- and free-form
source. The arguments that won the day were the idea of keeping the
semantics the same between fixed- and free-form source and to maintain
backward compatibility. For me personally, I don't mind typing that line
in my codes, but I know that some programmers do dislike it. On the
other hand, there are some programmers who prefer implicit typing, so
even if IMPLICIT NONE had become the default, they would have continued
to use IMPLICIT REAL(A-H,O-Z),INTEGER(I-N) statements and to continue
that practice.

> That was some serious failure of imagination back then which handicapped the practice of Fortran.

I think the main problem in the 1980s was that the vendors simply did
not want a new standard, for a variety of reasons. Both of the leading
vendors at the time, IBM and DEC, lobbied heavily against revising the
language, along with some smaller vendors such as CONVEX. At least
within ANSI, the vendors had more sway than the users of the language.
It was the ISO committee that stepped up and basically saved the
language from extinction. ISO approved the new language revision BEFORE
the ANSI committee did, something that was unprecedented. That kept
fortran alive, barely, for another decade. Then, I think it was the
development of gfortran that saved it a decade later. Almost certainly,
without ISO f90 and without a free open-source compiler like gfortran,
fortran would not have survived to the present day.

$.02 -Ron Shepard

Re: What results this legacy code should give?

<09c5e574-f781-4416-b077-6273da3d4ec5n@googlegroups.com>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=2240&group=comp.lang.fortran#2240

  copy link   Newsgroups: comp.lang.fortran
X-Received: by 2002:a05:620a:414d:b0:6a0:2035:f097 with SMTP id k13-20020a05620a414d00b006a02035f097mr9625563qko.458.1652037627543;
Sun, 08 May 2022 12:20:27 -0700 (PDT)
X-Received: by 2002:a25:73d1:0:b0:645:dba2:67c with SMTP id
o200-20020a2573d1000000b00645dba2067cmr9552429ybc.522.1652037627425; Sun, 08
May 2022 12:20:27 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!proxad.net!feeder1-2.proxad.net!209.85.160.216.MISMATCH!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.fortran
Date: Sun, 8 May 2022 12:20:27 -0700 (PDT)
In-Reply-To: <mYTdK.4621$arR.2928@fx48.iad>
Injection-Info: google-groups.googlegroups.com; posting-host=2601:546:300:4c20:8d50:559d:9ea8:e717;
posting-account=7tVJUQoAAACymEG6aShD5R0lhHCm_A0r
NNTP-Posting-Host: 2601:546:300:4c20:8d50:559d:9ea8:e717
References: <t53752$d0s$1@gioia.aioe.org> <4vbdK.242$7%M9.231@fx12.iad>
<jdndioFbqqvU1@mid.individual.net> <t560g3$fpb$1@newsreader4.netcologne.de>
<i0xdK.9778$gc62.7492@fx45.iad> <98b4b036-49f5-49d4-9c85-5ceb2e3982e5n@googlegroups.com>
<mYTdK.4621$arR.2928@fx48.iad>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <09c5e574-f781-4416-b077-6273da3d4ec5n@googlegroups.com>
Subject: Re: What results this legacy code should give?
From: urbanjost@comcast.net (John)
Injection-Date: Sun, 08 May 2022 19:20:27 +0000
Content-Type: text/plain; charset="UTF-8"
 by: John - Sun, 8 May 2022 19:20 UTC

I agree, although I think g95 saved it, then gfortran sustained it.

Re: What results this legacy code should give?

<t5qj77$g9d$1@gioia.aioe.org>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=2245&group=comp.lang.fortran#2245

  copy link   Newsgroups: comp.lang.fortran
Path: i2pn2.org!i2pn.org!aioe.org!nEZeG6rs+5s6fiWNW7iDag.user.46.165.242.75.POSTED!not-for-mail
From: helbig@asclothestro.multivax.de (Phillip Helbig (undress to reply)
Newsgroups: comp.lang.fortran
Subject: Re: What results this legacy code should give?
Date: Sun, 15 May 2022 10:04:23 -0000 (UTC)
Organization: Multivax C&R
Message-ID: <t5qj77$g9d$1@gioia.aioe.org>
References: <t53752$d0s$1@gioia.aioe.org> <4vbdK.242$7%M9.231@fx12.iad> <jdndioFbqqvU1@mid.individual.net> <t560g3$fpb$1@newsreader4.netcologne.de> <i0xdK.9778$gc62.7492@fx45.iad>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-15
Content-Transfer-Encoding: 8bit
Injection-Info: gioia.aioe.org; logging-data="16685"; posting-host="nEZeG6rs+5s6fiWNW7iDag.user.gioia.aioe.org"; mail-complaints-to="abuse@aioe.org";
X-Notice: Filtered by postfilter v. 0.9.2
 by: Phillip Helbig (undr - Sun, 15 May 2022 10:04 UTC

In article <i0xdK.9778$gc62.7492@fx45.iad>, Ron Shepard
<nospam@nowhere.org> writes:

> This has been mentioned a couple of times now in this thread, and just
> as a reminder IMPLICIT NONE was not part of standard fortran until f90.
> So if one wanted to write standard code in the 1980s, this was not an
> option.

But IMPLICIT LOGICAL was almost as good.

1
server_pubkey.txt

rocksolid light 0.9.81
clearnet tor