Rocksolid Light

Welcome to RetroBBS

mail  files  register  newsreader  groups  login

Message-ID:  

Unix soit qui mal y pense [Unix to him who evil thinks?]


devel / comp.lang.fortran / Re: f2c updated to handle Fortran structures

SubjectAuthor
* f2c updated to handle Fortran structuresLynn McGuire
+- Re: f2c updated to handle Fortran structuresgah4
+* Re: f2c updated to handle Fortran structuresRobin Vowels
|`* Re: f2c updated to handle Fortran structuresLynn McGuire
| `* Re: f2c updated to handle Fortran structuresRobin Vowels
|  `* Re: f2c updated to handle Fortran structuresLynn McGuire
|   +* Re: f2c updated to handle Fortran structuresDaniel Feenberg
|   |`* Re: f2c updated to handle Fortran structuresLynn McGuire
|   | `* Re: f2c updated to handle Fortran structuresThomas Koenig
|   |  +- Re: f2c updated to handle Fortran structuresgah4
|   |  `* Re: f2c updated to handle Fortran structuresLynn McGuire
|   |   `* Re: f2c updated to handle Fortran structuresRon Shepard
|   |    +* Re: f2c updated to handle Fortran structuresLynn McGuire
|   |    |`* Re: f2c updated to handle Fortran structuresgah4
|   |    | `* Re: f2c updated to handle Fortran structuresThomas Koenig
|   |    |  `* Re: f2c updated to handle Fortran structuresBeliavsky
|   |    |   +- Re: f2c updated to handle Fortran structuresgah4
|   |    |   +- Re: f2c updated to handle Fortran structuresRobin Vowels
|   |    |   +* Re: f2c updated to handle Fortran structuresFortranFan
|   |    |   |+* Re: f2c updated to handle Fortran structuresRon Shepard
|   |    |   ||+* Re: f2c updated to handle Fortran structuresFortranFan
|   |    |   |||`- Re: f2c updated to handle Fortran structuresRon Shepard
|   |    |   ||`* Re: f2c updated to handle Fortran structuresgah4
|   |    |   || `* Re: f2c updated to handle Fortran structuresRon Shepard
|   |    |   ||  `* Re: f2c updated to handle Fortran structuresgah4
|   |    |   ||   `* Re: f2c updated to handle Fortran structuresRon Shepard
|   |    |   ||    `* Re: f2c updated to handle Fortran structuresrobertpa...@gmail.com
|   |    |   ||     `* Re: f2c updated to handle Fortran structuresgah4
|   |    |   ||      `* Re: f2c updated to handle Fortran structuresLouis Krupp
|   |    |   ||       `- Re: f2c updated to handle Fortran structuresDavid Jones
|   |    |   |`* Re: f2c updated to handle Fortran structuresFortranFan
|   |    |   | +* Re: f2c updated to handle Fortran structuresgah4
|   |    |   | |`- Re: f2c updated to handle Fortran structuresRobin Vowels
|   |    |   | `- Re: f2c updated to handle Fortran structuresEv. Drikos
|   |    |   `* Re: f2c updated to handle Fortran structuresEv. Drikos
|   |    |    `* Re: f2c updated to handle Fortran structuresEv. Drikos
|   |    |     `- Re: f2c updated to handle Fortran structuresRon Shepard
|   |    +- Re: f2c updated to handle Fortran structuresgah4
|   |    `- Re: f2c updated to handle Fortran structuresRon Shepard
|   `* Re: f2c updated to handle Fortran structuresGary Scott
|    `* Re: f2c updated to handle Fortran structuresLynn McGuire
|     `* Re: f2c updated to handle Fortran structuresGary Scott
|      `- Re: f2c updated to handle Fortran structuresLynn McGuire
+- Re: f2c updated to handle Fortran structuresBeliavsky
`- Re: f2c updated to handle Fortran structuresCyrMag

Pages:12
Re: f2c updated to handle Fortran structures

<9K3mK.79505$5fVf.17464@fx09.iad>

  copy mid

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

  copy link   Newsgroups: comp.lang.fortran
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!feed1.usenet.blueworldhosting.com!peer02.iad!feed-me.highwinds-media.com!news.highwinds-media.com!fx09.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.1
Subject: Re: f2c updated to handle Fortran structures
Content-Language: en-US
Newsgroups: comp.lang.fortran
References: <t6orqm$hgp$1@dont-email.me>
<dc1dd966-a9a1-41f2-8da0-64b750a31130n@googlegroups.com>
<t6revk$crs$1@dont-email.me>
<cc5d3613-21f3-4426-aeba-4a31a0ec8084n@googlegroups.com>
<t744ab$lun$1@dont-email.me>
<6af2077d-2313-4acf-9d52-639cca5ceecbn@googlegroups.com>
<t75mn0$2bi$1@dont-email.me> <t75s97$m55$1@newsreader4.netcologne.de>
<t763dv$fea$1@dont-email.me> <OwLlK.2424$sW.1876@fx37.iad>
From: nospam@nowhere.org (Ron Shepard)
In-Reply-To: <OwLlK.2424$sW.1876@fx37.iad>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Lines: 61
Message-ID: <9K3mK.79505$5fVf.17464@fx09.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: Thu, 2 Jun 2022 09:24:05 -0500
X-Received-Bytes: 3997
 by: Ron Shepard - Thu, 2 Jun 2022 14:24 UTC

On 6/1/22 10:24 AM, Ron Shepard wrote:
> On 5/31/22 5:04 PM, Lynn McGuire wrote:
> [...]
>>> I am also not sure if the games it plays for array dummy arguments
>>> generate valid C or not.  If you look at
>>>
>>>        subroutine foo(x,n)
>>>        dimension x(n)
>>>        x(1) = 1.
>>>        end
>>>
>>> this gets translated to
>>>
>>> /* Subroutine */ int foo_(real *x, integer *n)
>>> {
>>>      /* Parameter adjustments */
>>>      --x;
>>>
>>>      /* Function Body */
>>>      x[1] = 1.f;
>>>      return 0;
>>> } /* foo_ */
>>>
>>> but for this another forum wold be more appropriate.
>>
>> That is valid C code and a valid pointer.
> [...]
>
> Others have already stated how it violates the C standard. The reason
> for this restriction in C was that the array concept was based on a
> segmented memory model. If the first element of the array happened to be
> at a segment boundary, then decrementing the pointer meant that the
> address was no longer necessarily even within the program's address
> space. Depending on the OS, it could be pointing at some part of the OS,
> or in a multitasking environment to the memory of another process. Then
> later when virtual memory became popular, it could have resulted in page
> address violations, depending on how exactly the virtual and actual
> memory were mapped to each other. Such address computations could
> trigger errors, even if the pointers were never referenced. The upper
> range of the pointers were accounted for in the language. I think the
> restriction was that the pointer was allowed to go one unit outside of
> the array bound, but it could not be dereferenced once it was there.
> There was no such allowance for the lower bound of the array, the
> language simply did not allow the pointer outside that range, whether or
> not it was later referenced or, as in the above example, incremented
> back to within the valid array range.

There was one other thing I wanted to add about the above C code. When
pointer arithmetic, such as the --x expression above, is performed, it
does not really add or subtract 1 to the hardware address. So there
isn't really a segment offset of 0 that get decremented by 1. What
really happens is that the hardware address is changed by the size of
the entity. That might be by 1 if the entity is a character array, but
if it is say a 4-byte integer, then it gets decremented by that size, or
if it is 54321-byte structure, then it gets decremented by 54321, etc.
If you think of C as a high-level assembler, then address arithmetic is
one of the few cases in the language where it looks more like a
high-level language than a low-level language.

$.02 -Ron Shepard

Re: f2c updated to handle Fortran structures

<f7b415ba-7d21-4a8e-a384-1a3697c7d117n@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.fortran
X-Received: by 2002:a05:6214:621:b0:432:5e0d:cb64 with SMTP id a1-20020a056214062100b004325e0dcb64mr60100251qvx.65.1654192492676;
Thu, 02 Jun 2022 10:54:52 -0700 (PDT)
X-Received: by 2002:a0d:d584:0:b0:30c:c99e:af6b with SMTP id
x126-20020a0dd584000000b0030cc99eaf6bmr6990301ywd.366.1654192492412; Thu, 02
Jun 2022 10:54:52 -0700 (PDT)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!feed1.usenet.blueworldhosting.com!peer02.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.fortran
Date: Thu, 2 Jun 2022 10:54:52 -0700 (PDT)
In-Reply-To: <632dcbbd-628a-4c1c-9f78-aa921a464f0dn@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=165.225.220.244; posting-account=ZZXq9AoAAAAQEcA7zKAGm0UFQh4gMBv7
NNTP-Posting-Host: 165.225.220.244
References: <t6orqm$hgp$1@dont-email.me> <dc1dd966-a9a1-41f2-8da0-64b750a31130n@googlegroups.com>
<t6revk$crs$1@dont-email.me> <cc5d3613-21f3-4426-aeba-4a31a0ec8084n@googlegroups.com>
<t744ab$lun$1@dont-email.me> <6af2077d-2313-4acf-9d52-639cca5ceecbn@googlegroups.com>
<t75mn0$2bi$1@dont-email.me> <t75s97$m55$1@newsreader4.netcologne.de>
<t763dv$fea$1@dont-email.me> <OwLlK.2424$sW.1876@fx37.iad>
<t789sh$dfi$1@dont-email.me> <30a62c0b-6c3b-4e85-a1df-0a707d0c7327n@googlegroups.com>
<t78hka$6iv$1@newsreader4.netcologne.de> <632dcbbd-628a-4c1c-9f78-aa921a464f0dn@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <f7b415ba-7d21-4a8e-a384-1a3697c7d117n@googlegroups.com>
Subject: Re: f2c updated to handle Fortran structures
From: parekhvs@gmail.com (FortranFan)
Injection-Date: Thu, 02 Jun 2022 17:54:52 +0000
Content-Type: text/plain; charset="UTF-8"
X-Received-Bytes: 2205
 by: FortranFan - Thu, 2 Jun 2022 17:54 UTC

On Wednesday, June 1, 2022 at 9:31:17 PM UTC-4, Beliavsky wrote:

>
> I have wondered why certain statements are not allowed after the test
> in the Fortran one-line if statement. Often I want to write something like
>
> if (i > 0) if (x(i) > 0.0) print*,"i, x(i)=",i,x(i)

My understanding is starting Fortran 202X, the following will be conforming code based on the new feature introduction of *conditional expressions*:

if ( ( i > 0 ? ( if ( x(i) > 0.0 ) ? .true. : .false. ) : .false. ) ) print *, "i, x(i) = ", i , x(i)

Re: f2c updated to handle Fortran structures

<5dcmK.2560$sW.42@fx37.iad>

  copy mid

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

  copy link   Newsgroups: comp.lang.fortran
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!feed1.usenet.blueworldhosting.com!peer01.iad!feed-me.highwinds-media.com!news.highwinds-media.com!fx37.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.1
Subject: Re: f2c updated to handle Fortran structures
Content-Language: en-US
Newsgroups: comp.lang.fortran
References: <t6orqm$hgp$1@dont-email.me>
<dc1dd966-a9a1-41f2-8da0-64b750a31130n@googlegroups.com>
<t6revk$crs$1@dont-email.me>
<cc5d3613-21f3-4426-aeba-4a31a0ec8084n@googlegroups.com>
<t744ab$lun$1@dont-email.me>
<6af2077d-2313-4acf-9d52-639cca5ceecbn@googlegroups.com>
<t75mn0$2bi$1@dont-email.me> <t75s97$m55$1@newsreader4.netcologne.de>
<t763dv$fea$1@dont-email.me> <OwLlK.2424$sW.1876@fx37.iad>
<t789sh$dfi$1@dont-email.me>
<30a62c0b-6c3b-4e85-a1df-0a707d0c7327n@googlegroups.com>
<t78hka$6iv$1@newsreader4.netcologne.de>
<632dcbbd-628a-4c1c-9f78-aa921a464f0dn@googlegroups.com>
<f7b415ba-7d21-4a8e-a384-1a3697c7d117n@googlegroups.com>
From: nospam@nowhere.org (Ron Shepard)
In-Reply-To: <f7b415ba-7d21-4a8e-a384-1a3697c7d117n@googlegroups.com>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Lines: 19
Message-ID: <5dcmK.2560$sW.42@fx37.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: Thu, 2 Jun 2022 19:03:12 -0500
X-Received-Bytes: 2349
 by: Ron Shepard - Fri, 3 Jun 2022 00:03 UTC

On 6/2/22 12:54 PM, FortranFan wrote:
> On Wednesday, June 1, 2022 at 9:31:17 PM UTC-4, Beliavsky wrote:
>
>>
>> I have wondered why certain statements are not allowed after the test
>> in the Fortran one-line if statement. Often I want to write something like
>>
>> if (i > 0) if (x(i) > 0.0) print*,"i, x(i)=",i,x(i)
>
> My understanding is starting Fortran 202X, the following will be conforming code based on the new feature introduction of *conditional expressions*:
>
> if ( ( i > 0 ? ( if ( x(i) > 0.0 ) ? .true. : .false. ) : .false. ) ) print *, "i, x(i) = ", i , x(i)

One wonders, if they wanted to add something redundant to the language
to save typing a few extra characters, why didn't just add the above
fortran-like statement rather than incorporate the C-like syntax? Was
there any discussion about allowing the chained if statements?

$.02 -Ron Shepard

Re: f2c updated to handle Fortran structures

<fdbe88ec-6470-46fd-8abc-9a676bc74c82n@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.fortran
X-Received: by 2002:a05:6214:234f:b0:467:cb2f:cbfe with SMTP id hu15-20020a056214234f00b00467cb2fcbfemr4647800qvb.61.1654220402063;
Thu, 02 Jun 2022 18:40:02 -0700 (PDT)
X-Received: by 2002:a25:2c4c:0:b0:65d:3767:2ef2 with SMTP id
s73-20020a252c4c000000b0065d37672ef2mr8637384ybs.570.1654220401830; Thu, 02
Jun 2022 18:40:01 -0700 (PDT)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!feed1.usenet.blueworldhosting.com!peer02.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.fortran
Date: Thu, 2 Jun 2022 18:40:01 -0700 (PDT)
In-Reply-To: <5dcmK.2560$sW.42@fx37.iad>
Injection-Info: google-groups.googlegroups.com; posting-host=165.225.220.250; posting-account=ZZXq9AoAAAAQEcA7zKAGm0UFQh4gMBv7
NNTP-Posting-Host: 165.225.220.250
References: <t6orqm$hgp$1@dont-email.me> <dc1dd966-a9a1-41f2-8da0-64b750a31130n@googlegroups.com>
<t6revk$crs$1@dont-email.me> <cc5d3613-21f3-4426-aeba-4a31a0ec8084n@googlegroups.com>
<t744ab$lun$1@dont-email.me> <6af2077d-2313-4acf-9d52-639cca5ceecbn@googlegroups.com>
<t75mn0$2bi$1@dont-email.me> <t75s97$m55$1@newsreader4.netcologne.de>
<t763dv$fea$1@dont-email.me> <OwLlK.2424$sW.1876@fx37.iad>
<t789sh$dfi$1@dont-email.me> <30a62c0b-6c3b-4e85-a1df-0a707d0c7327n@googlegroups.com>
<t78hka$6iv$1@newsreader4.netcologne.de> <632dcbbd-628a-4c1c-9f78-aa921a464f0dn@googlegroups.com>
<f7b415ba-7d21-4a8e-a384-1a3697c7d117n@googlegroups.com> <5dcmK.2560$sW.42@fx37.iad>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <fdbe88ec-6470-46fd-8abc-9a676bc74c82n@googlegroups.com>
Subject: Re: f2c updated to handle Fortran structures
From: parekhvs@gmail.com (FortranFan)
Injection-Date: Fri, 03 Jun 2022 01:40:02 +0000
Content-Type: text/plain; charset="UTF-8"
X-Received-Bytes: 2332
 by: FortranFan - Fri, 3 Jun 2022 01:40 UTC

On Thursday, June 2, 2022 at 8:03:17 PM UTC-4, Ron Shepard wrote:

> ..
> One wonders, if they wanted to add something redundant to the language
> to save typing a few extra characters, why didn't just add the above
> fortran-like statement rather than incorporate the C-like syntax? Was
> there any discussion about allowing the chained if statements? ..

Anyone wondering can read a previous thread at this forum on this, especially the comments by @Steve Lionel who can provide the best commentary on the discussions:
https://groups.google.com/g/comp.lang.fortran/c/q8UaefqOFpc/m/V2m-eji0AQAJ

Re: f2c updated to handle Fortran structures

<4a7d85c5-3d19-4366-abce-e94a4cc48011n@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.fortran
X-Received: by 2002:a05:620a:16d9:b0:6a3:75cc:3224 with SMTP id a25-20020a05620a16d900b006a375cc3224mr5160906qkn.458.1654220413295;
Thu, 02 Jun 2022 18:40:13 -0700 (PDT)
X-Received: by 2002:a81:52c4:0:b0:30c:5a3b:6537 with SMTP id
g187-20020a8152c4000000b0030c5a3b6537mr9001133ywb.5.1654220413120; Thu, 02
Jun 2022 18:40:13 -0700 (PDT)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!feed1.usenet.blueworldhosting.com!peer02.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.fortran
Date: Thu, 2 Jun 2022 18:40:12 -0700 (PDT)
In-Reply-To: <5dcmK.2560$sW.42@fx37.iad>
Injection-Info: google-groups.googlegroups.com; posting-host=2601:602:9700:4689:128:58ed:f816:2dd5;
posting-account=gLDX1AkAAAA26M5HM-O3sVMAXdxK9FPA
NNTP-Posting-Host: 2601:602:9700:4689:128:58ed:f816:2dd5
References: <t6orqm$hgp$1@dont-email.me> <dc1dd966-a9a1-41f2-8da0-64b750a31130n@googlegroups.com>
<t6revk$crs$1@dont-email.me> <cc5d3613-21f3-4426-aeba-4a31a0ec8084n@googlegroups.com>
<t744ab$lun$1@dont-email.me> <6af2077d-2313-4acf-9d52-639cca5ceecbn@googlegroups.com>
<t75mn0$2bi$1@dont-email.me> <t75s97$m55$1@newsreader4.netcologne.de>
<t763dv$fea$1@dont-email.me> <OwLlK.2424$sW.1876@fx37.iad>
<t789sh$dfi$1@dont-email.me> <30a62c0b-6c3b-4e85-a1df-0a707d0c7327n@googlegroups.com>
<t78hka$6iv$1@newsreader4.netcologne.de> <632dcbbd-628a-4c1c-9f78-aa921a464f0dn@googlegroups.com>
<f7b415ba-7d21-4a8e-a384-1a3697c7d117n@googlegroups.com> <5dcmK.2560$sW.42@fx37.iad>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <4a7d85c5-3d19-4366-abce-e94a4cc48011n@googlegroups.com>
Subject: Re: f2c updated to handle Fortran structures
From: gah4@u.washington.edu (gah4)
Injection-Date: Fri, 03 Jun 2022 01:40:13 +0000
Content-Type: text/plain; charset="UTF-8"
X-Received-Bytes: 2800
 by: gah4 - Fri, 3 Jun 2022 01:40 UTC

On Thursday, June 2, 2022 at 5:03:17 PM UTC-7, Ron Shepard wrote:

(snip, someone wrote)

> > if ( ( i > 0 ? ( if ( x(i) > 0.0 ) ? .true. : .false. ) : .false. ) ) print *, "i, x(i) = ", i , x(i)

> One wonders, if they wanted to add something redundant to the language
> to save typing a few extra characters, why didn't just add the above
> fortran-like statement rather than incorporate the C-like syntax? Was
> there any discussion about allowing the chained if statements?

Well, for one, chained IF only works for the .AND. operation.

In the case of .OR. with a GOTO statement, I just put in two separate
IF statements. I tend to do that less with a more complicated statement
on the IF, but sometimes.

The normal use for the conditional operator is not in IF statements,
but in other expressions.

Also, as well as I know it, the above could be written:

if ( i > 0 ? ( x(i) > 0.0 ) : .false. ) print *, "i, x(i) = ", i , x(i)

That is, the inner conditional operator isn't needed.

Re: f2c updated to handle Fortran structures

<9b2a45df-b9ec-4292-bcbb-fcf277410b41n@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.fortran
X-Received: by 2002:a05:6214:20e8:b0:464:6bcc:ad67 with SMTP id 8-20020a05621420e800b004646bccad67mr9376028qvk.77.1654234607268;
Thu, 02 Jun 2022 22:36:47 -0700 (PDT)
X-Received: by 2002:a25:5e45:0:b0:660:6f22:c31b with SMTP id
s66-20020a255e45000000b006606f22c31bmr4500815ybb.612.1654234607081; Thu, 02
Jun 2022 22:36:47 -0700 (PDT)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!feed1.usenet.blueworldhosting.com!peer02.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.fortran
Date: Thu, 2 Jun 2022 22:36:46 -0700 (PDT)
In-Reply-To: <f7b415ba-7d21-4a8e-a384-1a3697c7d117n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=165.225.220.244; posting-account=ZZXq9AoAAAAQEcA7zKAGm0UFQh4gMBv7
NNTP-Posting-Host: 165.225.220.244
References: <t6orqm$hgp$1@dont-email.me> <dc1dd966-a9a1-41f2-8da0-64b750a31130n@googlegroups.com>
<t6revk$crs$1@dont-email.me> <cc5d3613-21f3-4426-aeba-4a31a0ec8084n@googlegroups.com>
<t744ab$lun$1@dont-email.me> <6af2077d-2313-4acf-9d52-639cca5ceecbn@googlegroups.com>
<t75mn0$2bi$1@dont-email.me> <t75s97$m55$1@newsreader4.netcologne.de>
<t763dv$fea$1@dont-email.me> <OwLlK.2424$sW.1876@fx37.iad>
<t789sh$dfi$1@dont-email.me> <30a62c0b-6c3b-4e85-a1df-0a707d0c7327n@googlegroups.com>
<t78hka$6iv$1@newsreader4.netcologne.de> <632dcbbd-628a-4c1c-9f78-aa921a464f0dn@googlegroups.com>
<f7b415ba-7d21-4a8e-a384-1a3697c7d117n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <9b2a45df-b9ec-4292-bcbb-fcf277410b41n@googlegroups.com>
Subject: Re: f2c updated to handle Fortran structures
From: parekhvs@gmail.com (FortranFan)
Injection-Date: Fri, 03 Jun 2022 05:36:47 +0000
Content-Type: text/plain; charset="UTF-8"
X-Received-Bytes: 2709
 by: FortranFan - Fri, 3 Jun 2022 05:36 UTC

On Thursday, June 2, 2022 at 1:54:54 PM UTC-4, FortranFan wrote:

> ..
> My understanding is starting Fortran 202X, the following will be conforming code based on the new feature introduction of *conditional expressions*:
>
> if ( ( i > 0 ? ( if ( x(i) > 0.0 ) ? .true. : .false. ) : .false. ) ) print *, "i, x(i) = ", i , x(i)

Apologies, I made an error by including an `IF` in the inner expression. The following is what I think the Fortran 202X standard will allow:

if ( i > 0 ? ( x(i) > 0.0 ? .true. : .false. ) : .false. ) print *, "i, x(i) = ", i , x(i)

By the way, I do not think the brackets around the inner expression are needed per the BNF in the standard, that is the following should work as well:

if ( i > 0 ? x(i) > 0.0 ? .true. : .false. : .false. ) print *, "i, x(i) = ", i , x(i)

But I think many a coder will find it easier to comprehend the conditional-expr with the inner brackets, hence the first statement above for somewhat better clarity.

Re: f2c updated to handle Fortran structures

<946c0c94-525b-46e1-983e-b345eefd46b0n@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.fortran
X-Received: by 2002:a05:622a:183:b0:301:b1a6:2383 with SMTP id s3-20020a05622a018300b00301b1a62383mr6317783qtw.42.1654237376819;
Thu, 02 Jun 2022 23:22:56 -0700 (PDT)
X-Received: by 2002:a05:6902:2c6:b0:64f:5b77:6869 with SMTP id
w6-20020a05690202c600b0064f5b776869mr9390731ybh.494.1654237376642; Thu, 02
Jun 2022 23:22:56 -0700 (PDT)
Path: i2pn2.org!i2pn.org!usenet.goja.nl.eu.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: Thu, 2 Jun 2022 23:22:56 -0700 (PDT)
In-Reply-To: <9b2a45df-b9ec-4292-bcbb-fcf277410b41n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=2601:602:9700:4689:c4b6:e85e:1d75:9bac;
posting-account=gLDX1AkAAAA26M5HM-O3sVMAXdxK9FPA
NNTP-Posting-Host: 2601:602:9700:4689:c4b6:e85e:1d75:9bac
References: <t6orqm$hgp$1@dont-email.me> <dc1dd966-a9a1-41f2-8da0-64b750a31130n@googlegroups.com>
<t6revk$crs$1@dont-email.me> <cc5d3613-21f3-4426-aeba-4a31a0ec8084n@googlegroups.com>
<t744ab$lun$1@dont-email.me> <6af2077d-2313-4acf-9d52-639cca5ceecbn@googlegroups.com>
<t75mn0$2bi$1@dont-email.me> <t75s97$m55$1@newsreader4.netcologne.de>
<t763dv$fea$1@dont-email.me> <OwLlK.2424$sW.1876@fx37.iad>
<t789sh$dfi$1@dont-email.me> <30a62c0b-6c3b-4e85-a1df-0a707d0c7327n@googlegroups.com>
<t78hka$6iv$1@newsreader4.netcologne.de> <632dcbbd-628a-4c1c-9f78-aa921a464f0dn@googlegroups.com>
<f7b415ba-7d21-4a8e-a384-1a3697c7d117n@googlegroups.com> <9b2a45df-b9ec-4292-bcbb-fcf277410b41n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <946c0c94-525b-46e1-983e-b345eefd46b0n@googlegroups.com>
Subject: Re: f2c updated to handle Fortran structures
From: gah4@u.washington.edu (gah4)
Injection-Date: Fri, 03 Jun 2022 06:22:56 +0000
Content-Type: text/plain; charset="UTF-8"
 by: gah4 - Fri, 3 Jun 2022 06:22 UTC

On Thursday, June 2, 2022 at 10:36:48 PM UTC-7, FortranFan wrote:

(snip)

> Apologies, I made an error by including an `IF` in the inner expression.

Some years ago I used an ALGOL system that used IF THEN ELSE for
its conditional operator:

X:= IF A>B THEN A ELSE B;

I think I like the C notation, but others might like that one.
I suspect it would cause problems in fixed form where blanks
(or lack of) are not significant. IF, THEN, and ELSE are
already reserved words in ALGOL.

Re: f2c updated to handle Fortran structures

<t7c9qo$1mkd$1@gioia.aioe.org>

  copy mid

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

  copy link   Newsgroups: comp.lang.fortran
Path: i2pn2.org!i2pn.org!aioe.org!GHEfyR61dxKgljSkvcqntg.user.46.165.242.91.POSTED!not-for-mail
From: drikosev@gmail.com (Ev. Drikos)
Newsgroups: comp.lang.fortran
Subject: Re: f2c updated to handle Fortran structures
Date: Fri, 3 Jun 2022 09:30:47 +0300
Organization: Aioe.org NNTP Server
Message-ID: <t7c9qo$1mkd$1@gioia.aioe.org>
References: <t6orqm$hgp$1@dont-email.me>
<dc1dd966-a9a1-41f2-8da0-64b750a31130n@googlegroups.com>
<t6revk$crs$1@dont-email.me>
<cc5d3613-21f3-4426-aeba-4a31a0ec8084n@googlegroups.com>
<t744ab$lun$1@dont-email.me>
<6af2077d-2313-4acf-9d52-639cca5ceecbn@googlegroups.com>
<t75mn0$2bi$1@dont-email.me> <t75s97$m55$1@newsreader4.netcologne.de>
<t763dv$fea$1@dont-email.me> <OwLlK.2424$sW.1876@fx37.iad>
<t789sh$dfi$1@dont-email.me>
<30a62c0b-6c3b-4e85-a1df-0a707d0c7327n@googlegroups.com>
<t78hka$6iv$1@newsreader4.netcologne.de>
<632dcbbd-628a-4c1c-9f78-aa921a464f0dn@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="55949"; posting-host="GHEfyR61dxKgljSkvcqntg.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-Mozilla-News-Host: news://news.aioe.org
X-Notice: Filtered by postfilter v. 0.9.2
Content-Language: en-US
 by: Ev. Drikos - Fri, 3 Jun 2022 06:30 UTC

On 02/06/2022 04:31, Beliavsky wrote:
> ...
>
> I have wondered why certain statements are not allowed after the test
> in the Fortran one-line if statement. Often I want to write something like
>
> if (i > 0) if (x(i) > 0.0) print*,"i, x(i)=",i,x(i)
>

At first glance, it seems to be very simple & straightforward. In
specific, the draft has a plain text constraint that makes the above
invalid, and so removing the constraint shall normally be simple enough.

I also wonder if the evaluation order in this code is undefined:

$ cat all.f90 && gfc all.f90 && ./a.out

real :: x(10)
integer :: i

if ( all([i>0,x(i)>0])) print*,"i, x(i)=",i,x(i)

end

$

Re: f2c updated to handle Fortran structures

<t7cek3$1oe0$1@gioia.aioe.org>

  copy mid

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

  copy link   Newsgroups: comp.lang.fortran
Path: i2pn2.org!i2pn.org!aioe.org!GHEfyR61dxKgljSkvcqntg.user.46.165.242.91.POSTED!not-for-mail
From: drikosev@gmail.com (Ev. Drikos)
Newsgroups: comp.lang.fortran
Subject: Re: f2c updated to handle Fortran structures
Date: Fri, 3 Jun 2022 10:52:34 +0300
Organization: Aioe.org NNTP Server
Message-ID: <t7cek3$1oe0$1@gioia.aioe.org>
References: <t6orqm$hgp$1@dont-email.me>
<dc1dd966-a9a1-41f2-8da0-64b750a31130n@googlegroups.com>
<t6revk$crs$1@dont-email.me>
<cc5d3613-21f3-4426-aeba-4a31a0ec8084n@googlegroups.com>
<t744ab$lun$1@dont-email.me>
<6af2077d-2313-4acf-9d52-639cca5ceecbn@googlegroups.com>
<t75mn0$2bi$1@dont-email.me> <t75s97$m55$1@newsreader4.netcologne.de>
<t763dv$fea$1@dont-email.me> <OwLlK.2424$sW.1876@fx37.iad>
<t789sh$dfi$1@dont-email.me>
<30a62c0b-6c3b-4e85-a1df-0a707d0c7327n@googlegroups.com>
<t78hka$6iv$1@newsreader4.netcologne.de>
<632dcbbd-628a-4c1c-9f78-aa921a464f0dn@googlegroups.com>
<f7b415ba-7d21-4a8e-a384-1a3697c7d117n@googlegroups.com>
<9b2a45df-b9ec-4292-bcbb-fcf277410b41n@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="57792"; posting-host="GHEfyR61dxKgljSkvcqntg.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
Content-Language: en-US
 by: Ev. Drikos - Fri, 3 Jun 2022 07:52 UTC

On 03/06/2022 08:36, FortranFan wrote:
> ...
> By the way, I do not think the brackets around the inner expression are needed per the BNF in the standard, that is the following should work as well:
>
> if ( i > 0 ? x(i) > 0.0 ? .true. : .false. : .false. ) print *, "i, x(i) = ", i , x(i)
>
IMHO, additional parentheses are required according to his thread:
https://groups.google.com/g/comp.lang.fortran/c/q8UaefqOFpc/m/V2m-eji0AQAJ

FYI, there is a claim here that the upcoming conditional expressions
were finally found to be context sensitive:

https://github.com/drikosev/Fortran/commit/9a6095bb6b34f27131547a327a9c360f840f0d89

Re: f2c updated to handle Fortran structures

<t7d3g7$17ou$1@gioia.aioe.org>

  copy mid

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

  copy link   Newsgroups: comp.lang.fortran
Path: i2pn2.org!i2pn.org!aioe.org!OXCe5kMqBgrbR0uF3hfYww.user.46.165.242.91.POSTED!not-for-mail
From: drikosev@gmail.com (Ev. Drikos)
Newsgroups: comp.lang.fortran
Subject: Re: f2c updated to handle Fortran structures
Date: Fri, 3 Jun 2022 16:48:55 +0300
Organization: Aioe.org NNTP Server
Message-ID: <t7d3g7$17ou$1@gioia.aioe.org>
References: <t6orqm$hgp$1@dont-email.me>
<dc1dd966-a9a1-41f2-8da0-64b750a31130n@googlegroups.com>
<t6revk$crs$1@dont-email.me>
<cc5d3613-21f3-4426-aeba-4a31a0ec8084n@googlegroups.com>
<t744ab$lun$1@dont-email.me>
<6af2077d-2313-4acf-9d52-639cca5ceecbn@googlegroups.com>
<t75mn0$2bi$1@dont-email.me> <t75s97$m55$1@newsreader4.netcologne.de>
<t763dv$fea$1@dont-email.me> <OwLlK.2424$sW.1876@fx37.iad>
<t789sh$dfi$1@dont-email.me>
<30a62c0b-6c3b-4e85-a1df-0a707d0c7327n@googlegroups.com>
<t78hka$6iv$1@newsreader4.netcologne.de>
<632dcbbd-628a-4c1c-9f78-aa921a464f0dn@googlegroups.com>
<t7c9qo$1mkd$1@gioia.aioe.org>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Info: gioia.aioe.org; logging-data="40734"; posting-host="OXCe5kMqBgrbR0uF3hfYww.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-Mozilla-News-Host: news://news.aioe.org
X-Notice: Filtered by postfilter v. 0.9.2
Content-Language: en-US
 by: Ev. Drikos - Fri, 3 Jun 2022 13:48 UTC

On 03/06/2022 09:30, Ev. Drikos wrote:
> ...
>
>
> I also wonder if the evaluation order in this code is undefined:
>
> $ cat all.f90 && gfc all.f90 && ./a.out
>
>  real    :: x(10)
>  integer :: i
>
>  if ( all([i>0,x(i)>0])) print*,"i, x(i)=",i,x(i)
>
>  end
>
> $

Ok, this code is likely garbage as it crashed ie with:

integer :: i = -99999999

Re: f2c updated to handle Fortran structures

<x_omK.20130$6P.2133@fx38.iad>

  copy mid

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

  copy link   Newsgroups: comp.lang.fortran
Path: i2pn2.org!i2pn.org!news.neodome.net!feeder1.feed.usenet.farm!feed.usenet.farm!news-out.netnews.com!news.alt.net!fdc2.netnews.com!peer01.ams1!peer.ams1.xlned.com!news.xlned.com!peer01.iad!feed-me.highwinds-media.com!news.highwinds-media.com!fx38.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.10.0
Subject: Re: f2c updated to handle Fortran structures
Content-Language: en-US
Newsgroups: comp.lang.fortran
References: <t6orqm$hgp$1@dont-email.me>
<dc1dd966-a9a1-41f2-8da0-64b750a31130n@googlegroups.com>
<t6revk$crs$1@dont-email.me>
<cc5d3613-21f3-4426-aeba-4a31a0ec8084n@googlegroups.com>
<t744ab$lun$1@dont-email.me>
<6af2077d-2313-4acf-9d52-639cca5ceecbn@googlegroups.com>
<t75mn0$2bi$1@dont-email.me> <t75s97$m55$1@newsreader4.netcologne.de>
<t763dv$fea$1@dont-email.me> <OwLlK.2424$sW.1876@fx37.iad>
<t789sh$dfi$1@dont-email.me>
<30a62c0b-6c3b-4e85-a1df-0a707d0c7327n@googlegroups.com>
<t78hka$6iv$1@newsreader4.netcologne.de>
<632dcbbd-628a-4c1c-9f78-aa921a464f0dn@googlegroups.com>
<f7b415ba-7d21-4a8e-a384-1a3697c7d117n@googlegroups.com>
<5dcmK.2560$sW.42@fx37.iad>
<fdbe88ec-6470-46fd-8abc-9a676bc74c82n@googlegroups.com>
From: nospam@nowhere.org (Ron Shepard)
In-Reply-To: <fdbe88ec-6470-46fd-8abc-9a676bc74c82n@googlegroups.com>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Lines: 26
Message-ID: <x_omK.20130$6P.2133@fx38.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, 3 Jun 2022 09:35:08 -0500
X-Received-Bytes: 3039
 by: Ron Shepard - Fri, 3 Jun 2022 14:35 UTC

On 6/2/22 8:40 PM, FortranFan wrote:
> On Thursday, June 2, 2022 at 8:03:17 PM UTC-4, Ron Shepard wrote:
>
>> ..
>> One wonders, if they wanted to add something redundant to the language
>> to save typing a few extra characters, why didn't just add the above
>> fortran-like statement rather than incorporate the C-like syntax? Was
>> there any discussion about allowing the chained if statements? ..
>
> Anyone wondering can read a previous thread at this forum on this, especially the comments by @Steve Lionel who can provide the best commentary on the discussions:
> https://groups.google.com/g/comp.lang.fortran/c/q8UaefqOFpc/m/V2m-eji0AQAJ

Yes, I contributed a few posts to that discussion. However, there was no
discussion there regarding the above question, namely allowing chained
if statements to evaluate short-circuiting logical expressions. The
fortran semantics are already correct for a single if statement, all
that would be necessary is to remove the current restriction to allow
them to chain together.

The modifiable aspect of the ?:: construct result looks to be useful,
but as shown above it can be verbose and confusing when nested for other
purposes. Allowing chained if statements seems to avoid both of those
problems. I wonder if that was discussed by the committee during any of
the short-circuit addition possibilities?

$.02 -Ron Shepard

Re: f2c updated to handle Fortran structures

<VepmK.66211$wIO9.26288@fx12.iad>

  copy mid

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

  copy link   Newsgroups: comp.lang.fortran
Path: i2pn2.org!i2pn.org!aioe.org!news.uzoreto.com!feeder1.feed.usenet.farm!feed.usenet.farm!news-out.netnews.com!news.alt.net!fdc2.netnews.com!peer02.ams1!peer.ams1.xlned.com!news.xlned.com!peer02.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.10.0
Subject: Re: f2c updated to handle Fortran structures
Content-Language: en-US
Newsgroups: comp.lang.fortran
References: <t6orqm$hgp$1@dont-email.me>
<dc1dd966-a9a1-41f2-8da0-64b750a31130n@googlegroups.com>
<t6revk$crs$1@dont-email.me>
<cc5d3613-21f3-4426-aeba-4a31a0ec8084n@googlegroups.com>
<t744ab$lun$1@dont-email.me>
<6af2077d-2313-4acf-9d52-639cca5ceecbn@googlegroups.com>
<t75mn0$2bi$1@dont-email.me> <t75s97$m55$1@newsreader4.netcologne.de>
<t763dv$fea$1@dont-email.me> <OwLlK.2424$sW.1876@fx37.iad>
<t789sh$dfi$1@dont-email.me>
<30a62c0b-6c3b-4e85-a1df-0a707d0c7327n@googlegroups.com>
<t78hka$6iv$1@newsreader4.netcologne.de>
<632dcbbd-628a-4c1c-9f78-aa921a464f0dn@googlegroups.com>
<f7b415ba-7d21-4a8e-a384-1a3697c7d117n@googlegroups.com>
<5dcmK.2560$sW.42@fx37.iad>
<4a7d85c5-3d19-4366-abce-e94a4cc48011n@googlegroups.com>
From: nospam@nowhere.org (Ron Shepard)
In-Reply-To: <4a7d85c5-3d19-4366-abce-e94a4cc48011n@googlegroups.com>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Lines: 36
Message-ID: <VepmK.66211$wIO9.26288@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, 3 Jun 2022 09:52:36 -0500
X-Received-Bytes: 3121
 by: Ron Shepard - Fri, 3 Jun 2022 14:52 UTC

On 6/2/22 8:40 PM, gah4 wrote:
> On Thursday, June 2, 2022 at 5:03:17 PM UTC-7, Ron Shepard wrote:
>
> (snip, someone wrote)
>
>>> if ( ( i > 0 ? ( if ( x(i) > 0.0 ) ? .true. : .false. ) : .false. ) ) print *, "i, x(i) = ", i , x(i)
>
>> One wonders, if they wanted to add something redundant to the language
>> to save typing a few extra characters, why didn't just add the above
>> fortran-like statement rather than incorporate the C-like syntax? Was
>> there any discussion about allowing the chained if statements?
>
> Well, for one, chained IF only works for the .AND. operation.

I'm not sure I follow this. In an if statement, any logical expression
can be used. In the short-circuit evaluation context, it would just keep
evaluating the expressions until a .false. is generated, and then it
would stop.

> Also, as well as I know it, the above could be written:
>
> if ( i > 0 ? ( x(i) > 0.0 ) : .false. ) print *, "i, x(i) = ", i , x(i)
>
> That is, the inner conditional operator isn't needed.

Yes you are using the advantage of the if statement that I'm talking
about. Still, something like

if ( i>0 ) if ( x(i)>0.0 ) print *, "i, x(i) = ", i , x(i)

seems to have some advantages, even with the ?:: operator available. To
my eye, that is the clearest way to accomplish that print statement of
all the suggestions. All that would be needed is to remove the current
restriction in the language.

$.02 -Ron Shepard

Re: f2c updated to handle Fortran structures

<6opmK.73424$vAW9.64716@fx10.iad>

  copy mid

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

  copy link   Newsgroups: comp.lang.fortran
Path: i2pn2.org!i2pn.org!aioe.org!feeder1.feed.usenet.farm!feed.usenet.farm!news-out.netnews.com!news.alt.net!fdc2.netnews.com!peer01.ams1!peer.ams1.xlned.com!news.xlned.com!peer03.iad!feed-me.highwinds-media.com!news.highwinds-media.com!fx10.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.10.0
Subject: Re: f2c updated to handle Fortran structures
Content-Language: en-US
Newsgroups: comp.lang.fortran
References: <t6orqm$hgp$1@dont-email.me>
<dc1dd966-a9a1-41f2-8da0-64b750a31130n@googlegroups.com>
<t6revk$crs$1@dont-email.me>
<cc5d3613-21f3-4426-aeba-4a31a0ec8084n@googlegroups.com>
<t744ab$lun$1@dont-email.me>
<6af2077d-2313-4acf-9d52-639cca5ceecbn@googlegroups.com>
<t75mn0$2bi$1@dont-email.me> <t75s97$m55$1@newsreader4.netcologne.de>
<t763dv$fea$1@dont-email.me> <OwLlK.2424$sW.1876@fx37.iad>
<t789sh$dfi$1@dont-email.me>
<30a62c0b-6c3b-4e85-a1df-0a707d0c7327n@googlegroups.com>
<t78hka$6iv$1@newsreader4.netcologne.de>
<632dcbbd-628a-4c1c-9f78-aa921a464f0dn@googlegroups.com>
<t7c9qo$1mkd$1@gioia.aioe.org> <t7d3g7$17ou$1@gioia.aioe.org>
From: nospam@nowhere.org (Ron Shepard)
In-Reply-To: <t7d3g7$17ou$1@gioia.aioe.org>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Lines: 30
Message-ID: <6opmK.73424$vAW9.64716@fx10.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, 3 Jun 2022 10:02:26 -0500
X-Received-Bytes: 2282
 by: Ron Shepard - Fri, 3 Jun 2022 15:02 UTC

On 6/3/22 8:48 AM, Ev. Drikos wrote:
> On 03/06/2022 09:30, Ev. Drikos wrote:
>> ...
>>
>>
>> I also wonder if the evaluation order in this code is undefined:
>>
>> $ cat all.f90 && gfc all.f90 && ./a.out
>>
>>   real    :: x(10)
>>   integer :: i
>>
>>   if ( all([i>0,x(i)>0])) print*,"i, x(i)=",i,x(i)
>>
>>   end
>>
>> $
>
> Ok, this code is likely garbage as it crashed ie with:
>
> integer :: i = -99999999

You must be using the gfortran option to initialize integer values.

To answer the original question, I do not think the order of evaluation
of the arguments to the all() intrinsic is defined. The compiler is free
to optimize any order or to reuse previously computed results.

$.02 -Ron Shepard

Re: f2c updated to handle Fortran structures

<2d9ab811-b753-4f89-b987-f54fc795576dn@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.fortran
X-Received: by 2002:a05:622a:390:b0:301:b64d:c7fd with SMTP id j16-20020a05622a039000b00301b64dc7fdmr8858994qtx.439.1654285148625;
Fri, 03 Jun 2022 12:39:08 -0700 (PDT)
X-Received: by 2002:a25:ed0e:0:b0:65d:119d:fb60 with SMTP id
k14-20020a25ed0e000000b0065d119dfb60mr12804111ybh.456.1654285148498; Fri, 03
Jun 2022 12:39:08 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!news.uzoreto.com!news-out.netnews.com!news.alt.net!fdc2.netnews.com!peer01.ams1!peer.ams1.xlned.com!news.xlned.com!peer02.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.fortran
Date: Fri, 3 Jun 2022 12:39:08 -0700 (PDT)
In-Reply-To: <VepmK.66211$wIO9.26288@fx12.iad>
Injection-Info: google-groups.googlegroups.com; posting-host=2601:602:9700:4689:3973:1b25:a786:4145;
posting-account=gLDX1AkAAAA26M5HM-O3sVMAXdxK9FPA
NNTP-Posting-Host: 2601:602:9700:4689:3973:1b25:a786:4145
References: <t6orqm$hgp$1@dont-email.me> <dc1dd966-a9a1-41f2-8da0-64b750a31130n@googlegroups.com>
<t6revk$crs$1@dont-email.me> <cc5d3613-21f3-4426-aeba-4a31a0ec8084n@googlegroups.com>
<t744ab$lun$1@dont-email.me> <6af2077d-2313-4acf-9d52-639cca5ceecbn@googlegroups.com>
<t75mn0$2bi$1@dont-email.me> <t75s97$m55$1@newsreader4.netcologne.de>
<t763dv$fea$1@dont-email.me> <OwLlK.2424$sW.1876@fx37.iad>
<t789sh$dfi$1@dont-email.me> <30a62c0b-6c3b-4e85-a1df-0a707d0c7327n@googlegroups.com>
<t78hka$6iv$1@newsreader4.netcologne.de> <632dcbbd-628a-4c1c-9f78-aa921a464f0dn@googlegroups.com>
<f7b415ba-7d21-4a8e-a384-1a3697c7d117n@googlegroups.com> <5dcmK.2560$sW.42@fx37.iad>
<4a7d85c5-3d19-4366-abce-e94a4cc48011n@googlegroups.com> <VepmK.66211$wIO9.26288@fx12.iad>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <2d9ab811-b753-4f89-b987-f54fc795576dn@googlegroups.com>
Subject: Re: f2c updated to handle Fortran structures
From: gah4@u.washington.edu (gah4)
Injection-Date: Fri, 03 Jun 2022 19:39:08 +0000
Content-Type: text/plain; charset="UTF-8"
X-Received-Bytes: 2658
 by: gah4 - Fri, 3 Jun 2022 19:39 UTC

On Friday, June 3, 2022 at 7:52:40 AM UTC-7, Ron Shepard wrote:

(snip, I wrote)

> > Well, for one, chained IF only works for the .AND. operation.

> I'm not sure I follow this. In an if statement, any logical expression
> can be used. In the short-circuit evaluation context, it would just keep
> evaluating the expressions until a .false. is generated, and then it
> would stop.

You can (or could if it was allowed by the standard) convert:

if( A .AND. B .AND. C) ...

to

if(A) if(B) if(C) ...

You can convert:

if(A .OR. B .OR. C) ...

to

if(A) ...
if(B) ...
if(C) ...

at least when the ... is a GOTO, or some assignments.

Re: f2c updated to handle Fortran structures

<7524ad9d-d675-4003-9a0a-dae33094779an@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.fortran
X-Received: by 2002:a05:6214:238d:b0:461:d89a:e1f3 with SMTP id fw13-20020a056214238d00b00461d89ae1f3mr65293212qvb.118.1654319157795;
Fri, 03 Jun 2022 22:05:57 -0700 (PDT)
X-Received: by 2002:a25:cc4e:0:b0:65c:854b:c111 with SMTP id
l75-20020a25cc4e000000b0065c854bc111mr14580508ybf.218.1654319157650; Fri, 03
Jun 2022 22:05:57 -0700 (PDT)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!feed1.usenet.blueworldhosting.com!peer03.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.fortran
Date: Fri, 3 Jun 2022 22:05:57 -0700 (PDT)
In-Reply-To: <946c0c94-525b-46e1-983e-b345eefd46b0n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=202.67.103.232; posting-account=S_MdrwoAAAD7T2pxG2e393dk6y0tc0Le
NNTP-Posting-Host: 202.67.103.232
References: <t6orqm$hgp$1@dont-email.me> <dc1dd966-a9a1-41f2-8da0-64b750a31130n@googlegroups.com>
<t6revk$crs$1@dont-email.me> <cc5d3613-21f3-4426-aeba-4a31a0ec8084n@googlegroups.com>
<t744ab$lun$1@dont-email.me> <6af2077d-2313-4acf-9d52-639cca5ceecbn@googlegroups.com>
<t75mn0$2bi$1@dont-email.me> <t75s97$m55$1@newsreader4.netcologne.de>
<t763dv$fea$1@dont-email.me> <OwLlK.2424$sW.1876@fx37.iad>
<t789sh$dfi$1@dont-email.me> <30a62c0b-6c3b-4e85-a1df-0a707d0c7327n@googlegroups.com>
<t78hka$6iv$1@newsreader4.netcologne.de> <632dcbbd-628a-4c1c-9f78-aa921a464f0dn@googlegroups.com>
<f7b415ba-7d21-4a8e-a384-1a3697c7d117n@googlegroups.com> <9b2a45df-b9ec-4292-bcbb-fcf277410b41n@googlegroups.com>
<946c0c94-525b-46e1-983e-b345eefd46b0n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <7524ad9d-d675-4003-9a0a-dae33094779an@googlegroups.com>
Subject: Re: f2c updated to handle Fortran structures
From: robin.vowels@gmail.com (Robin Vowels)
Injection-Date: Sat, 04 Jun 2022 05:05:57 +0000
Content-Type: text/plain; charset="UTF-8"
X-Received-Bytes: 2503
 by: Robin Vowels - Sat, 4 Jun 2022 05:05 UTC

On Friday, June 3, 2022 at 4:22:58 PM UTC+10, gah4 wrote:
> On Thursday, June 2, 2022 at 10:36:48 PM UTC-7, FortranFan wrote:
>
> (snip)
> > Apologies, I made an error by including an `IF` in the inner expression.
> Some years ago I used an ALGOL system that used IF THEN ELSE for
> its conditional operator:
>
> X:= IF A>B THEN A ELSE B;

That is standard Algol 60.
..
> I think I like the C notation, but others might like that one.
> I suspect it would cause problems in fixed form
..
Algol is free form source.
..
> where blanks
> (or lack of) are not significant. IF, THEN, and ELSE are
> already reserved words in ALGOL.

Re: f2c updated to handle Fortran structures

<nGHmK.85386$J0r9.51405@fx11.iad>

  copy mid

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

  copy link   Newsgroups: comp.lang.fortran
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!feed1.usenet.blueworldhosting.com!peer02.iad!feed-me.highwinds-media.com!news.highwinds-media.com!fx11.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.10.0
Subject: Re: f2c updated to handle Fortran structures
Content-Language: en-US
Newsgroups: comp.lang.fortran
References: <t6orqm$hgp$1@dont-email.me>
<dc1dd966-a9a1-41f2-8da0-64b750a31130n@googlegroups.com>
<t6revk$crs$1@dont-email.me>
<cc5d3613-21f3-4426-aeba-4a31a0ec8084n@googlegroups.com>
<t744ab$lun$1@dont-email.me>
<6af2077d-2313-4acf-9d52-639cca5ceecbn@googlegroups.com>
<t75mn0$2bi$1@dont-email.me> <t75s97$m55$1@newsreader4.netcologne.de>
<t763dv$fea$1@dont-email.me> <OwLlK.2424$sW.1876@fx37.iad>
<t789sh$dfi$1@dont-email.me>
<30a62c0b-6c3b-4e85-a1df-0a707d0c7327n@googlegroups.com>
<t78hka$6iv$1@newsreader4.netcologne.de>
<632dcbbd-628a-4c1c-9f78-aa921a464f0dn@googlegroups.com>
<f7b415ba-7d21-4a8e-a384-1a3697c7d117n@googlegroups.com>
<5dcmK.2560$sW.42@fx37.iad>
<4a7d85c5-3d19-4366-abce-e94a4cc48011n@googlegroups.com>
<VepmK.66211$wIO9.26288@fx12.iad>
<2d9ab811-b753-4f89-b987-f54fc795576dn@googlegroups.com>
From: nospam@nowhere.org (Ron Shepard)
In-Reply-To: <2d9ab811-b753-4f89-b987-f54fc795576dn@googlegroups.com>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Lines: 26
Message-ID: <nGHmK.85386$J0r9.51405@fx11.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, 4 Jun 2022 06:50:42 -0500
X-Received-Bytes: 2473
 by: Ron Shepard - Sat, 4 Jun 2022 11:50 UTC

On 6/3/22 2:39 PM, gah4 wrote:
> On Friday, June 3, 2022 at 7:52:40 AM UTC-7, Ron Shepard wrote:
[...]
> You can convert:
>
> if(A .OR. B .OR. C) ...
>
> to
>
> if(A) ...
> if(B) ...
> if(C) ...
>
> at least when the ... is a GOTO, or some assignments.

The ?:: notation does not address this either, right? For this,
something like a short-circuiting OR is required that forces the
compiler to evaluate the expressions in left-to-right order with no
precomputation or out-of-order evaluation allowed. A short circuiting
ANY() operator with those same restrictions would also work.

However, the idea that the result of ?:: is modifiable is a new kind of
expression in fortran. None of these other possibilities would naturally
have that feature.

$.02 -Ron Shepard

Re: f2c updated to handle Fortran structures

<0f15a5dc-c725-4b25-8d8b-4afe94fb2c14n@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.fortran
X-Received: by 2002:a05:620a:410:b0:6a6:abbe:2018 with SMTP id 16-20020a05620a041000b006a6abbe2018mr2502130qkp.645.1654354906537;
Sat, 04 Jun 2022 08:01:46 -0700 (PDT)
X-Received: by 2002:a05:6902:2c6:b0:64f:5b77:6869 with SMTP id
w6-20020a05690202c600b0064f5b776869mr16262529ybh.494.1654354906372; Sat, 04
Jun 2022 08:01:46 -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, 4 Jun 2022 08:01:46 -0700 (PDT)
In-Reply-To: <nGHmK.85386$J0r9.51405@fx11.iad>
Injection-Info: google-groups.googlegroups.com; posting-host=108.74.162.237; posting-account=r3eTlQoAAAABvPStTQdpPnri4DjaXXqT
NNTP-Posting-Host: 108.74.162.237
References: <t6orqm$hgp$1@dont-email.me> <dc1dd966-a9a1-41f2-8da0-64b750a31130n@googlegroups.com>
<t6revk$crs$1@dont-email.me> <cc5d3613-21f3-4426-aeba-4a31a0ec8084n@googlegroups.com>
<t744ab$lun$1@dont-email.me> <6af2077d-2313-4acf-9d52-639cca5ceecbn@googlegroups.com>
<t75mn0$2bi$1@dont-email.me> <t75s97$m55$1@newsreader4.netcologne.de>
<t763dv$fea$1@dont-email.me> <OwLlK.2424$sW.1876@fx37.iad>
<t789sh$dfi$1@dont-email.me> <30a62c0b-6c3b-4e85-a1df-0a707d0c7327n@googlegroups.com>
<t78hka$6iv$1@newsreader4.netcologne.de> <632dcbbd-628a-4c1c-9f78-aa921a464f0dn@googlegroups.com>
<f7b415ba-7d21-4a8e-a384-1a3697c7d117n@googlegroups.com> <5dcmK.2560$sW.42@fx37.iad>
<4a7d85c5-3d19-4366-abce-e94a4cc48011n@googlegroups.com> <VepmK.66211$wIO9.26288@fx12.iad>
<2d9ab811-b753-4f89-b987-f54fc795576dn@googlegroups.com> <nGHmK.85386$J0r9.51405@fx11.iad>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <0f15a5dc-c725-4b25-8d8b-4afe94fb2c14n@googlegroups.com>
Subject: Re: f2c updated to handle Fortran structures
From: robertpaulcorbett@gmail.com (robertpa...@gmail.com)
Injection-Date: Sat, 04 Jun 2022 15:01:46 +0000
Content-Type: text/plain; charset="UTF-8"
 by: robertpa...@gmail.co - Sat, 4 Jun 2022 15:01 UTC

On Saturday, June 4, 2022 at 4:50:47 AM UTC-7, Ron Shepard wrote:
> On 6/3/22 2:39 PM, gah4 wrote:
> > On Friday, June 3, 2022 at 7:52:40 AM UTC-7, Ron Shepard wrote:
> [...]
> > You can convert:
> >
> > if(A .OR. B .OR. C) ...
> >
> > to
> >
> > if(A) ...
> > if(B) ...
> > if(C) ...
> >
> > at least when the ... is a GOTO, or some assignments.
> The ?:: notation does not address this either, right? For this,
> something like a short-circuiting OR is required that forces the
> compiler to evaluate the expressions in left-to-right order with no
> precomputation or out-of-order evaluation allowed. A short circuiting
> ANY() operator with those same restrictions would also work.
>
> However, the idea that the result of ?:: is modifiable is a new kind of
> expression in fortran. None of these other possibilities would naturally
> have that feature.
>
> $.02 -Ron Shepard

Anything that can be done with short-circuit logical operators can
also be done using conditional expressions. The expression

A .OR. B .OR. C

where the .OR. operators are short-circuit operators is equivalent to

( A ? .TRUE. : ( B ? .TRUE. : C ) )

Left-to-right order is forced. No precomputation or out-of-order
execution is allowed.

Re: f2c updated to handle Fortran structures

<d51d3990-4d80-414d-a771-f3c2daf05112n@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.fortran
X-Received: by 2002:ad4:5d69:0:b0:466:1be0:88db with SMTP id fn9-20020ad45d69000000b004661be088dbmr13809912qvb.41.1654376384436;
Sat, 04 Jun 2022 13:59:44 -0700 (PDT)
X-Received: by 2002:a25:8281:0:b0:663:287e:659d with SMTP id
r1-20020a258281000000b00663287e659dmr7167747ybk.522.1654376383867; Sat, 04
Jun 2022 13:59:43 -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: Sat, 4 Jun 2022 13:59:43 -0700 (PDT)
In-Reply-To: <0f15a5dc-c725-4b25-8d8b-4afe94fb2c14n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=2601:602:9700:4689:517d:1d4e:1bd6:6fe2;
posting-account=gLDX1AkAAAA26M5HM-O3sVMAXdxK9FPA
NNTP-Posting-Host: 2601:602:9700:4689:517d:1d4e:1bd6:6fe2
References: <t6orqm$hgp$1@dont-email.me> <dc1dd966-a9a1-41f2-8da0-64b750a31130n@googlegroups.com>
<t6revk$crs$1@dont-email.me> <cc5d3613-21f3-4426-aeba-4a31a0ec8084n@googlegroups.com>
<t744ab$lun$1@dont-email.me> <6af2077d-2313-4acf-9d52-639cca5ceecbn@googlegroups.com>
<t75mn0$2bi$1@dont-email.me> <t75s97$m55$1@newsreader4.netcologne.de>
<t763dv$fea$1@dont-email.me> <OwLlK.2424$sW.1876@fx37.iad>
<t789sh$dfi$1@dont-email.me> <30a62c0b-6c3b-4e85-a1df-0a707d0c7327n@googlegroups.com>
<t78hka$6iv$1@newsreader4.netcologne.de> <632dcbbd-628a-4c1c-9f78-aa921a464f0dn@googlegroups.com>
<f7b415ba-7d21-4a8e-a384-1a3697c7d117n@googlegroups.com> <5dcmK.2560$sW.42@fx37.iad>
<4a7d85c5-3d19-4366-abce-e94a4cc48011n@googlegroups.com> <VepmK.66211$wIO9.26288@fx12.iad>
<2d9ab811-b753-4f89-b987-f54fc795576dn@googlegroups.com> <nGHmK.85386$J0r9.51405@fx11.iad>
<0f15a5dc-c725-4b25-8d8b-4afe94fb2c14n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <d51d3990-4d80-414d-a771-f3c2daf05112n@googlegroups.com>
Subject: Re: f2c updated to handle Fortran structures
From: gah4@u.washington.edu (gah4)
Injection-Date: Sat, 04 Jun 2022 20:59:44 +0000
Content-Type: text/plain; charset="UTF-8"
 by: gah4 - Sat, 4 Jun 2022 20:59 UTC

On Saturday, June 4, 2022 at 8:01:48 AM UTC-7, Robert Corbett wrote:

(snip)

> Anything that can be done with short-circuit logical operators can
> also be done using conditional expressions. The expression
> A .OR. B .OR. C
> where the .OR. operators are short-circuit operators is equivalent to
> ( A ? .TRUE. : ( B ? .TRUE. : C ) )

Yes. But it is still ugly.

I suspect that there is desire not to change the old logical operators,
but there could be new ones.

Conditional expressions are nice and useful in many places.

Looking at that one, I have no idea what optimizing compilers
will do with it. I am pretty sure that for logical IF, compilers
rarely evaluate the logical expression (that is, store a .TRUE.
or .FALSE. somewhere). I would be less sure in this case.

> Left-to-right order is forced. No precomputation or out-of-order
> execution is allowed.

But that doesn't mean that we can't have new operators
that look nicer, and are easier to read.

Re: f2c updated to handle Fortran structures

<1ftnK.45324$IgSc.31055@fx45.iad>

  copy mid

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

  copy link   Newsgroups: comp.lang.fortran
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!feed1.usenet.blueworldhosting.com!peer01.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 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101
Thunderbird/91.9.1
Subject: Re: f2c updated to handle Fortran structures
Content-Language: en-US
Newsgroups: comp.lang.fortran
References: <t6orqm$hgp$1@dont-email.me>
<dc1dd966-a9a1-41f2-8da0-64b750a31130n@googlegroups.com>
<t6revk$crs$1@dont-email.me>
<cc5d3613-21f3-4426-aeba-4a31a0ec8084n@googlegroups.com>
<t744ab$lun$1@dont-email.me>
<6af2077d-2313-4acf-9d52-639cca5ceecbn@googlegroups.com>
<t75mn0$2bi$1@dont-email.me> <t75s97$m55$1@newsreader4.netcologne.de>
<t763dv$fea$1@dont-email.me> <OwLlK.2424$sW.1876@fx37.iad>
<t789sh$dfi$1@dont-email.me>
<30a62c0b-6c3b-4e85-a1df-0a707d0c7327n@googlegroups.com>
<t78hka$6iv$1@newsreader4.netcologne.de>
<632dcbbd-628a-4c1c-9f78-aa921a464f0dn@googlegroups.com>
<f7b415ba-7d21-4a8e-a384-1a3697c7d117n@googlegroups.com>
<5dcmK.2560$sW.42@fx37.iad>
<4a7d85c5-3d19-4366-abce-e94a4cc48011n@googlegroups.com>
<VepmK.66211$wIO9.26288@fx12.iad>
<2d9ab811-b753-4f89-b987-f54fc795576dn@googlegroups.com>
<nGHmK.85386$J0r9.51405@fx11.iad>
<0f15a5dc-c725-4b25-8d8b-4afe94fb2c14n@googlegroups.com>
<d51d3990-4d80-414d-a771-f3c2daf05112n@googlegroups.com>
From: lkrupp@invalid.pssw.com.invalid (Louis Krupp)
In-Reply-To: <d51d3990-4d80-414d-a771-f3c2daf05112n@googlegroups.com>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Lines: 40
Message-ID: <1ftnK.45324$IgSc.31055@fx45.iad>
X-Complaints-To: abuse(at)newshosting.com
NNTP-Posting-Date: Mon, 06 Jun 2022 20:14:53 UTC
Organization: Newshosting.com - Highest quality at a great price! www.newshosting.com
Date: Mon, 6 Jun 2022 14:14:53 -0600
X-Received-Bytes: 3063
 by: Louis Krupp - Mon, 6 Jun 2022 20:14 UTC

On 6/4/2022 2:59 PM, gah4 wrote:
> On Saturday, June 4, 2022 at 8:01:48 AM UTC-7, Robert Corbett wrote:
>
> (snip)
>
>> Anything that can be done with short-circuit logical operators can
>> also be done using conditional expressions. The expression
>
>> A .OR. B .OR. C
>
>> where the .OR. operators are short-circuit operators is equivalent to
>
>> ( A ? .TRUE. : ( B ? .TRUE. : C ) )
> Yes. But it is still ugly.
>
> I suspect that there is desire not to change the old logical operators,
> but there could be new ones.
>
> Conditional expressions are nice and useful in many places.
>
> Looking at that one, I have no idea what optimizing compilers
> will do with it. I am pretty sure that for logical IF, compilers
> rarely evaluate the logical expression (that is, store a .TRUE.
> or .FALSE. somewhere). I would be less sure in this case.
>
>> Left-to-right order is forced. No precomputation or out-of-order
>> execution is allowed.
> But that doesn't mean that we can't have new operators
> that look nicer, and are easier to read.
>
>

I agree.

Fortran could borrow "conditional" operators from Burroughs/Unisys ALGOL:

"a .CAND. b" will not evaluate b if a is false, and "a. COR. b" will not
evaluate b if a is true.

Louis

Re: f2c updated to handle Fortran structures

<t7o8ho$1ee9$1@gioia.aioe.org>

  copy mid

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

  copy link   Newsgroups: comp.lang.fortran
Path: i2pn2.org!i2pn.org!aioe.org!/Adh2v7LvPPHwMhGJ8JsiA.user.46.165.242.91.POSTED!not-for-mail
From: dajhawk18xx@@nowhere.com (David Jones)
Newsgroups: comp.lang.fortran
Subject: Re: f2c updated to handle Fortran structures
Date: Tue, 7 Jun 2022 19:22:32 -0000 (UTC)
Organization: Aioe.org NNTP Server
Message-ID: <t7o8ho$1ee9$1@gioia.aioe.org>
References: <t6orqm$hgp$1@dont-email.me> <dc1dd966-a9a1-41f2-8da0-64b750a31130n@googlegroups.com> <t6revk$crs$1@dont-email.me> <cc5d3613-21f3-4426-aeba-4a31a0ec8084n@googlegroups.com> <t744ab$lun$1@dont-email.me> <6af2077d-2313-4acf-9d52-639cca5ceecbn@googlegroups.com> <t75mn0$2bi$1@dont-email.me> <t75s97$m55$1@newsreader4.netcologne.de> <t763dv$fea$1@dont-email.me> <OwLlK.2424$sW.1876@fx37.iad> <t789sh$dfi$1@dont-email.me> <30a62c0b-6c3b-4e85-a1df-0a707d0c7327n@googlegroups.com> <t78hka$6iv$1@newsreader4.netcologne.de> <632dcbbd-628a-4c1c-9f78-aa921a464f0dn@googlegroups.com> <f7b415ba-7d21-4a8e-a384-1a3697c7d117n@googlegroups.com> <5dcmK.2560$sW.42@fx37.iad> <4a7d85c5-3d19-4366-abce-e94a4cc48011n@googlegroups.com> <VepmK.66211$wIO9.26288@fx12.iad> <2d9ab811-b753-4f89-b987-f54fc795576dn@googlegroups.com> <nGHmK.85386$J0r9.51405@fx11.iad> <0f15a5dc-c725-4b25-8d8b-4afe94fb2c14n@googlegroups.com> <d51d3990-4d80-414d-a771-f3c2daf05112n@googlegroups.com> <1ftnK.45324$IgSc.31055@fx45.iad>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 7bit
Injection-Info: gioia.aioe.org; logging-data="47561"; posting-host="/Adh2v7LvPPHwMhGJ8JsiA.user.gioia.aioe.org"; mail-complaints-to="abuse@aioe.org";
User-Agent: XanaNews/1.21-f3fb89f (x86; Portable ISpell)
X-Notice: Filtered by postfilter v. 0.9.2
 by: David Jones - Tue, 7 Jun 2022 19:22 UTC

Louis Krupp wrote:

> On 6/4/2022 2:59 PM, gah4 wrote:
> > On Saturday, June 4, 2022 at 8:01:48 AM UTC-7, Robert Corbett wrote:
> >
> > (snip)
> >
> > > Anything that can be done with short-circuit logical operators can
> > > also be done using conditional expressions. The expression
> >
> > > A .OR. B .OR. C
> >
> > > where the .OR. operators are short-circuit operators is
> > > equivalent to
> >
> > > ( A ? .TRUE. : ( B ? .TRUE. : C ) )
> > Yes. But it is still ugly.
> >
> > I suspect that there is desire not to change the old logical
> > operators, but there could be new ones.
> >
> > Conditional expressions are nice and useful in many places.
> >
> > Looking at that one, I have no idea what optimizing compilers
> > will do with it. I am pretty sure that for logical IF, compilers
> > rarely evaluate the logical expression (that is, store a .TRUE.
> > or .FALSE. somewhere). I would be less sure in this case.
> >
> > > Left-to-right order is forced. No precomputation or out-of-order
> > > execution is allowed.
> > But that doesn't mean that we can't have new operators
> > that look nicer, and are easier to read.
> >
> >
>
> I agree.
>
> Fortran could borrow "conditional" operators from Burroughs/Unisys
> ALGOL:
>
> "a .CAND. b" will not evaluate b if a is false, and "a. COR. b" will
> not evaluate b if a is true.
>
> Louis

This would provide the opportunity to be more directional, with .LAND.
, .RAND, , .LOR. and .ROR. to indicate which side gets evaluated first.

Pages:12
server_pubkey.txt

rocksolid light 0.9.81
clearnet tor