Rocksolid Light

Welcome to RetroBBS

mail  files  register  newsreader  groups  login

Message-ID:  

//GO.SYSIN DD *, DOODAH, DOODAH


devel / comp.lang.fortran / C++ to Fortran

SubjectAuthor
* C++ to Fortrandb
+* Re: C++ to FortranArjen Markus
|`* Re: C++ to Fortrandb
| `* Re: C++ to FortranJeff Ryman
|  +* Re: C++ to FortranArjen Markus
|  |`* Re: C++ to Fortrangah4
|  | `* Re: C++ to FortranGary Scott
|  |  `* Re: C++ to Fortrangah4
|  |   +- Re: C++ to FortranStefan Ram
|  |   +* Re: C++ to FortranGary Scott
|  |   |+- Re: C++ to Fortrangah4
|  |   |`- Re: C++ to FortranLynn McGuire
|  |   `* Re: C++ to Fortranrobin vowels
|  |    `* Re: C++ to Fortrangah4
|  |     `* Re: C++ to FortranLynn McGuire
|  |      `- Re: C++ to Fortrangah4
|  `- Re: C++ to FortranLynn McGuire
+- Re: C++ to Fortrangah4
`- Re: C++ to FortranThomas Koenig

1
C++ to Fortran

<uchpsj$1ku9u$1@dont-email.me>

  copy mid

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

  copy link   Newsgroups: comp.lang.fortran
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: dieterhansbritz@gmail.com (db)
Newsgroups: comp.lang.fortran
Subject: C++ to Fortran
Date: Mon, 28 Aug 2023 11:37:23 +0200
Organization: A noiseless patient Spider
Lines: 3
Message-ID: <uchpsj$1ku9u$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Mon, 28 Aug 2023 09:37:23 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="dcee2fcaa127457cb80873462963ed3f";
logging-data="1734974"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18EYC6/9a+735V/SC0KAIAWLrB8V1whN28="
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101
Thunderbird/102.13.0
Cancel-Lock: sha1:5qs9yfeSYFakN+386pMCRrzzBAo=
Content-Language: en-US
 by: db - Mon, 28 Aug 2023 09:37 UTC

Is there a good C++ converter to Fortran?
--
Dieter Britz

Re: C++ to Fortran

<5fbb8dcc-d5b9-45a4-9d4f-23caeebc0778n@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.fortran
X-Received: by 2002:a05:6214:ab4:b0:649:fc3d:7659 with SMTP id ew20-20020a0562140ab400b00649fc3d7659mr733246qvb.12.1693218459021;
Mon, 28 Aug 2023 03:27:39 -0700 (PDT)
X-Received: by 2002:ad4:58b4:0:b0:64a:24a4:3b9a with SMTP id
ea20-20020ad458b4000000b0064a24a43b9amr661522qvb.4.1693218458767; Mon, 28 Aug
2023 03:27:38 -0700 (PDT)
Path: i2pn2.org!i2pn.org!news.niel.me!glou.org!news.glou.org!usenet-fr.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: Mon, 28 Aug 2023 03:27:38 -0700 (PDT)
In-Reply-To: <uchpsj$1ku9u$1@dont-email.me>
Injection-Info: google-groups.googlegroups.com; posting-host=136.231.212.72; posting-account=A91wAAoAAADgBUxBX6QqsrSD26GLhVp8
NNTP-Posting-Host: 136.231.212.72
References: <uchpsj$1ku9u$1@dont-email.me>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <5fbb8dcc-d5b9-45a4-9d4f-23caeebc0778n@googlegroups.com>
Subject: Re: C++ to Fortran
From: arjen.markus895@gmail.com (Arjen Markus)
Injection-Date: Mon, 28 Aug 2023 10:27:39 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
 by: Arjen Markus - Mon, 28 Aug 2023 10:27 UTC

On Monday, August 28, 2023 at 11:37:28 AM UTC+2, db wrote:
> Is there a good C++ converter to Fortran?
> --
> Dieter Britz

Just to clarify: you do mean a tool to convert C++ code to Fortran code? Not a tool to make the connection between C++ code and Fortran code work smoothly?

Regards,

Arjen

Re: C++ to Fortran

<496d999e-9a6e-4f5c-86f6-b8438f3e7948n@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.fortran
X-Received: by 2002:a05:6214:9c5:b0:64a:157:88ff with SMTP id dp5-20020a05621409c500b0064a015788ffmr766240qvb.6.1693229966276;
Mon, 28 Aug 2023 06:39:26 -0700 (PDT)
X-Received: by 2002:a05:6a00:2da3:b0:68a:546d:596c with SMTP id
fb35-20020a056a002da300b0068a546d596cmr7533284pfb.5.1693229965754; Mon, 28
Aug 2023 06:39:25 -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: Mon, 28 Aug 2023 06:39:25 -0700 (PDT)
In-Reply-To: <uchpsj$1ku9u$1@dont-email.me>
Injection-Info: google-groups.googlegroups.com; posting-host=2601:602:9700:4689:a954:9255:836b:f29a;
posting-account=gLDX1AkAAAA26M5HM-O3sVMAXdxK9FPA
NNTP-Posting-Host: 2601:602:9700:4689:a954:9255:836b:f29a
References: <uchpsj$1ku9u$1@dont-email.me>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <496d999e-9a6e-4f5c-86f6-b8438f3e7948n@googlegroups.com>
Subject: Re: C++ to Fortran
From: gah4@u.washington.edu (gah4)
Injection-Date: Mon, 28 Aug 2023 13:39:26 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
 by: gah4 - Mon, 28 Aug 2023 13:39 UTC

On Monday, August 28, 2023 at 2:37:28 AM UTC-7, db wrote:
> Is there a good C++ converter to Fortran?

There might be some work on C to Fortran conversion.
(Maybe not enough to qualify as "good", though.)

The OO extensions to Fortran are more recent, and though they are
being implemented in compilers, maybe not completely debugged yet.
That would complicate the conversion of OO C++ to OO Fortran.

The actual design of the object-oriented parts of the two language
are not especially close, either.

Re: C++ to Fortran

<uckut5$29p0c$1@dont-email.me>

  copy mid

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

  copy link   Newsgroups: comp.lang.fortran
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: dieterhansbritz@gmail.com (db)
Newsgroups: comp.lang.fortran
Subject: Re: C++ to Fortran
Date: Tue, 29 Aug 2023 16:21:25 +0200
Organization: A noiseless patient Spider
Lines: 16
Message-ID: <uckut5$29p0c$1@dont-email.me>
References: <uchpsj$1ku9u$1@dont-email.me>
<5fbb8dcc-d5b9-45a4-9d4f-23caeebc0778n@googlegroups.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Tue, 29 Aug 2023 14:21:25 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="24215be4b321d0d5bd3c51f8639d47f2";
logging-data="2417676"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/Im/5D/OlExXthTSvhtYr1T0KsFs6rhH0="
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101
Thunderbird/102.13.0
Cancel-Lock: sha1:fTotGn10ltLRx6gQebgqA6a+MFM=
Content-Language: en-US
In-Reply-To: <5fbb8dcc-d5b9-45a4-9d4f-23caeebc0778n@googlegroups.com>
 by: db - Tue, 29 Aug 2023 14:21 UTC

On 28.08.2023 12.27, Arjen Markus wrote:
> On Monday, August 28, 2023 at 11:37:28 AM UTC+2, db wrote:
>> Is there a good C++ converter to Fortran?
>> --
>> Dieter Britz
>
> Just to clarify: you do mean a tool to convert C++ code to Fortran code? Not a tool to make the connection between C++ code and Fortran code work smoothly?
>
> Regards,
>
> Arjen
That's what I wanted, but maybe I should learn how to call C++
code from Fortran instead.
--
Dieter Britz

Re: C++ to Fortran

<9b605c0b-c8a1-40eb-a73f-428377f906a5n@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.fortran
X-Received: by 2002:a05:622a:8e:b0:410:9af1:f9d1 with SMTP id o14-20020a05622a008e00b004109af1f9d1mr913017qtw.9.1693328209511;
Tue, 29 Aug 2023 09:56:49 -0700 (PDT)
X-Received: by 2002:a17:902:dace:b0:1b5:bd8:5aaa with SMTP id
q14-20020a170902dace00b001b50bd85aaamr9817108plx.1.1693328209054; Tue, 29 Aug
2023 09:56:49 -0700 (PDT)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!peer01.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: Tue, 29 Aug 2023 09:56:48 -0700 (PDT)
In-Reply-To: <uckut5$29p0c$1@dont-email.me>
Injection-Info: google-groups.googlegroups.com; posting-host=2605:c840:402:fd00:8cc6:d139:d7df:8809;
posting-account=5z--qAoAAACnug7j_OOF1c_Rr7Nr64Gy
NNTP-Posting-Host: 2605:c840:402:fd00:8cc6:d139:d7df:8809
References: <uchpsj$1ku9u$1@dont-email.me> <5fbb8dcc-d5b9-45a4-9d4f-23caeebc0778n@googlegroups.com>
<uckut5$29p0c$1@dont-email.me>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <9b605c0b-c8a1-40eb-a73f-428377f906a5n@googlegroups.com>
Subject: Re: C++ to Fortran
From: rymanjc@outlook.com (Jeff Ryman)
Injection-Date: Tue, 29 Aug 2023 16:56:49 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Received-Bytes: 1975
 by: Jeff Ryman - Tue, 29 Aug 2023 16:56 UTC

On Tuesday, August 29, 2023 at 7:21:30 AM UTC-7, db wrote:
> On 28.08.2023 12.27, Arjen Markus wrote:
> > On Monday, August 28, 2023 at 11:37:28 AM UTC+2, db wrote:
> >> Is there a good C++ converter to Fortran?
> >> --
> >> Dieter Britz
> >
> > Just to clarify: you do mean a tool to convert C++ code to Fortran code? Not a tool to make the connection between C++ code and Fortran code work smoothly?
> >
> > Regards,
> >
> > Arjen
> That's what I wanted, but maybe I should learn how to call C++
> code from Fortran instead.
> --
> Dieter Britz
That prompts me to ask if the Fortran C Interoperability is sufficient to handle the needs of calling C++.

Re: C++ to Fortran

<ee5025c7-3121-4e6d-87a9-f54452f1c145n@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.fortran
X-Received: by 2002:a05:622a:309:b0:40c:1483:459c with SMTP id q9-20020a05622a030900b0040c1483459cmr793223qtw.2.1693330913911;
Tue, 29 Aug 2023 10:41:53 -0700 (PDT)
X-Received: by 2002:a17:902:cec2:b0:1bb:b39d:8cb0 with SMTP id
d2-20020a170902cec200b001bbb39d8cb0mr10742327plg.1.1693330913623; Tue, 29 Aug
2023 10:41:53 -0700 (PDT)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!peer01.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: Tue, 29 Aug 2023 10:41:52 -0700 (PDT)
In-Reply-To: <9b605c0b-c8a1-40eb-a73f-428377f906a5n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=62.194.189.128; posting-account=A91wAAoAAADgBUxBX6QqsrSD26GLhVp8
NNTP-Posting-Host: 62.194.189.128
References: <uchpsj$1ku9u$1@dont-email.me> <5fbb8dcc-d5b9-45a4-9d4f-23caeebc0778n@googlegroups.com>
<uckut5$29p0c$1@dont-email.me> <9b605c0b-c8a1-40eb-a73f-428377f906a5n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <ee5025c7-3121-4e6d-87a9-f54452f1c145n@googlegroups.com>
Subject: Re: C++ to Fortran
From: arjen.markus895@gmail.com (Arjen Markus)
Injection-Date: Tue, 29 Aug 2023 17:41:53 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Received-Bytes: 2397
 by: Arjen Markus - Tue, 29 Aug 2023 17:41 UTC

On Tuesday, August 29, 2023 at 6:56:51 PM UTC+2, Jeff Ryman wrote:
> On Tuesday, August 29, 2023 at 7:21:30 AM UTC-7, db wrote:
> > On 28.08.2023 12.27, Arjen Markus wrote:
> > > On Monday, August 28, 2023 at 11:37:28 AM UTC+2, db wrote:
> > >> Is there a good C++ converter to Fortran?
> > >> --
> > >> Dieter Britz
> > >
> > > Just to clarify: you do mean a tool to convert C++ code to Fortran code? Not a tool to make the connection between C++ code and Fortran code work smoothly?
> > >
> > > Regards,
> > >
> > > Arjen
> > That's what I wanted, but maybe I should learn how to call C++
> > code from Fortran instead.
> > --
> > Dieter Britz
> That prompts me to ask if the Fortran C Interoperability is sufficient to handle the needs of calling C++.

The interface would have to use the 'extern "C"' construction, so any C++ routine (function) to be called has to follow the C conventions. Other than that (and the limitations that puts on the interfacing), yes, I would say so.

Regards,

Arjen

Re: C++ to Fortran

<ucligo$2cs6k$1@dont-email.me>

  copy mid

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

  copy link   Newsgroups: comp.lang.fortran
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: lynnmcguire5@gmail.com (Lynn McGuire)
Newsgroups: comp.lang.fortran
Subject: Re: C++ to Fortran
Date: Tue, 29 Aug 2023 14:56:06 -0500
Organization: A noiseless patient Spider
Lines: 24
Message-ID: <ucligo$2cs6k$1@dont-email.me>
References: <uchpsj$1ku9u$1@dont-email.me>
<5fbb8dcc-d5b9-45a4-9d4f-23caeebc0778n@googlegroups.com>
<uckut5$29p0c$1@dont-email.me>
<9b605c0b-c8a1-40eb-a73f-428377f906a5n@googlegroups.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Tue, 29 Aug 2023 19:56:09 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="bb96c5477b9dd2958b6b01eb9f8cf132";
logging-data="2519252"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+GlTWt1xjlvJtQZE/sM8xeYfrTtaSqOPk="
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101
Thunderbird/102.14.0
Cancel-Lock: sha1:ZomNy8RQNrFvhGjOaXLVCTZFAlY=
Content-Language: en-US
In-Reply-To: <9b605c0b-c8a1-40eb-a73f-428377f906a5n@googlegroups.com>
 by: Lynn McGuire - Tue, 29 Aug 2023 19:56 UTC

On 8/29/2023 11:56 AM, Jeff Ryman wrote:
> On Tuesday, August 29, 2023 at 7:21:30 AM UTC-7, db wrote:
>> On 28.08.2023 12.27, Arjen Markus wrote:
>>> On Monday, August 28, 2023 at 11:37:28 AM UTC+2, db wrote:
>>>> Is there a good C++ converter to Fortran?
>>>> --
>>>> Dieter Britz
>>>
>>> Just to clarify: you do mean a tool to convert C++ code to Fortran code? Not a tool to make the connection between C++ code and Fortran code work smoothly?
>>>
>>> Regards,
>>>
>>> Arjen
>> That's what I wanted, but maybe I should learn how to call C++
>> code from Fortran instead.
>> --
>> Dieter Britz
> That prompts me to ask if the Fortran C Interoperability is sufficient to handle the needs of calling C++.

I do it all the time. I have 5,000 subroutines, 720,000 lines of F77
code, and 50,000 lines of C++ code.

Lynn

Re: C++ to Fortran

<258c15c6-7463-4d80-8326-0016c5a4ff1an@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.fortran
X-Received: by 2002:ad4:57ce:0:b0:649:114f:8379 with SMTP id y14-20020ad457ce000000b00649114f8379mr11217qvx.7.1693351157238;
Tue, 29 Aug 2023 16:19:17 -0700 (PDT)
X-Received: by 2002:a05:620a:21c7:b0:76d:8cc1:5463 with SMTP id
h7-20020a05620a21c700b0076d8cc15463mr12223qka.15.1693351157046; Tue, 29 Aug
2023 16:19:17 -0700 (PDT)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!diablo1.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: Tue, 29 Aug 2023 16:19:16 -0700 (PDT)
In-Reply-To: <ee5025c7-3121-4e6d-87a9-f54452f1c145n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=2601:602:9700:4689:74b8:377e:c090:274d;
posting-account=gLDX1AkAAAA26M5HM-O3sVMAXdxK9FPA
NNTP-Posting-Host: 2601:602:9700:4689:74b8:377e:c090:274d
References: <uchpsj$1ku9u$1@dont-email.me> <5fbb8dcc-d5b9-45a4-9d4f-23caeebc0778n@googlegroups.com>
<uckut5$29p0c$1@dont-email.me> <9b605c0b-c8a1-40eb-a73f-428377f906a5n@googlegroups.com>
<ee5025c7-3121-4e6d-87a9-f54452f1c145n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <258c15c6-7463-4d80-8326-0016c5a4ff1an@googlegroups.com>
Subject: Re: C++ to Fortran
From: gah4@u.washington.edu (gah4)
Injection-Date: Tue, 29 Aug 2023 23:19:17 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Received-Bytes: 2438
 by: gah4 - Tue, 29 Aug 2023 23:19 UTC

On Tuesday, August 29, 2023 at 10:41:56 AM UTC-7, Arjen Markus wrote:

(snip)

> The interface would have to use the 'extern "C"' construction, so any C++ routine
> (function) to be called has to follow the C conventions.
> Other than that (and the limitations that puts on the interfacing), yes, I would say so.

There has been very little discussion here on OO Fortran.

If one asks about C++, do we assume that they mean the OO features?

I did used to know people who wrote OO code in Fortran IV, (possibly using
extensions to Fortran 66). I didn't know about OO at the time, though.

It is then possible to write OO code in C, though with a little extra work that
you don't need to do with C++.

I suspect you could hand translate small amounts of OO C++ code to OO Fortran.
That should probably be done to better understand how OO Fortran works.

But larger amounts would be a lot of work!

As well as I know it, any maybe not all that well, the features don't all
directly translate.

Re: C++ to Fortran

<ucm740$2j5e4$1@dont-email.me>

  copy mid

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

  copy link   Newsgroups: comp.lang.fortran
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: garylscott@sbcglobal.net (Gary Scott)
Newsgroups: comp.lang.fortran
Subject: Re: C++ to Fortran
Date: Tue, 29 Aug 2023 20:47:44 -0500
Organization: A noiseless patient Spider
Lines: 24
Message-ID: <ucm740$2j5e4$1@dont-email.me>
References: <uchpsj$1ku9u$1@dont-email.me>
<5fbb8dcc-d5b9-45a4-9d4f-23caeebc0778n@googlegroups.com>
<uckut5$29p0c$1@dont-email.me>
<9b605c0b-c8a1-40eb-a73f-428377f906a5n@googlegroups.com>
<ee5025c7-3121-4e6d-87a9-f54452f1c145n@googlegroups.com>
<258c15c6-7463-4d80-8326-0016c5a4ff1an@googlegroups.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Wed, 30 Aug 2023 01:47:45 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="5999dc30aaf985e5a293550e69427337";
logging-data="2725316"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19QHoJ79pd+x2RO/61NyvC5hAnKoWmHcic="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:j7wibkU/1vcsZx2EwQWjA3lODWI=
In-Reply-To: <258c15c6-7463-4d80-8326-0016c5a4ff1an@googlegroups.com>
Content-Language: en-US
 by: Gary Scott - Wed, 30 Aug 2023 01:47 UTC

On 8/29/2023 6:19 PM, gah4 wrote:
> On Tuesday, August 29, 2023 at 10:41:56 AM UTC-7, Arjen Markus wrote:
>
> (snip)
>
>> The interface would have to use the 'extern "C"' construction, so any C++ routine
>> (function) to be called has to follow the C conventions.
>> Other than that (and the limitations that puts on the interfacing), yes, I would say so.
>
>
> There has been very little discussion here on OO Fortran.
>
> If one asks about C++, do we assume that they mean the OO features?
>
> I did used to know people who wrote OO code in Fortran IV, (possibly using
> extensions to Fortran 66). I didn't know about OO at the time, though.
>
> It is then possible to write OO code in C, though with a little extra work that
> you don't need to do with C++.

Isn't a single derived type an "OO" concept? I'm still not a fan of
derived types for procedure arguments (e.g. the win32 API...yuck). I
use the extensively for internal "global/common" purposes though.

Re: C++ to Fortran

<ucn5eb$35nv3$1@newsreader4.netcologne.de>

  copy mid

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

  copy link   Newsgroups: comp.lang.fortran
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!newsreader4.netcologne.de!news.netcologne.de!.POSTED.2a0a-a540-3bee-0-d5f7-9927-d671-a395.ipv6dyn.netcologne.de!not-for-mail
From: tkoenig@netcologne.de (Thomas Koenig)
Newsgroups: comp.lang.fortran
Subject: Re: C++ to Fortran
Date: Wed, 30 Aug 2023 10:25:15 -0000 (UTC)
Organization: news.netcologne.de
Distribution: world
Message-ID: <ucn5eb$35nv3$1@newsreader4.netcologne.de>
References: <uchpsj$1ku9u$1@dont-email.me>
Injection-Date: Wed, 30 Aug 2023 10:25:15 -0000 (UTC)
Injection-Info: newsreader4.netcologne.de; posting-host="2a0a-a540-3bee-0-d5f7-9927-d671-a395.ipv6dyn.netcologne.de:2a0a:a540:3bee:0:d5f7:9927:d671:a395";
logging-data="3334115"; mail-complaints-to="abuse@netcologne.de"
User-Agent: slrn/1.0.3 (Linux)
 by: Thomas Koenig - Wed, 30 Aug 2023 10:25 UTC

db <dieterhansbritz@gmail.com> schrieb:
> Is there a good C++ converter to Fortran?

Due to the ongoing feature stampede of C++, such a converter would
be extremely hard to write for the general case in a way that would
create maintainable code.

A few examples (far from complete, I am not a C++ expert): Unlike
C++, Fortran does not have templates, multiple inheritance, unsigned
numbers (which I think is an omission that should be rectified) etc.

Re: C++ to Fortran

<401e5a1f-91f2-4075-a910-ee8455b0fd93n@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.fortran
X-Received: by 2002:ad4:5906:0:b0:649:a0a:e094 with SMTP id ez6-20020ad45906000000b006490a0ae094mr10472qvb.0.1693415622830;
Wed, 30 Aug 2023 10:13:42 -0700 (PDT)
X-Received: by 2002:a05:6808:3092:b0:3a8:42ec:53b with SMTP id
bl18-20020a056808309200b003a842ec053bmr117660oib.3.1693415622443; Wed, 30 Aug
2023 10:13:42 -0700 (PDT)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!diablo1.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: Wed, 30 Aug 2023 10:13:42 -0700 (PDT)
In-Reply-To: <ucm740$2j5e4$1@dont-email.me>
Injection-Info: google-groups.googlegroups.com; posting-host=2601:602:9700:4689:4c34:b8ed:f322:cf32;
posting-account=gLDX1AkAAAA26M5HM-O3sVMAXdxK9FPA
NNTP-Posting-Host: 2601:602:9700:4689:4c34:b8ed:f322:cf32
References: <uchpsj$1ku9u$1@dont-email.me> <5fbb8dcc-d5b9-45a4-9d4f-23caeebc0778n@googlegroups.com>
<uckut5$29p0c$1@dont-email.me> <9b605c0b-c8a1-40eb-a73f-428377f906a5n@googlegroups.com>
<ee5025c7-3121-4e6d-87a9-f54452f1c145n@googlegroups.com> <258c15c6-7463-4d80-8326-0016c5a4ff1an@googlegroups.com>
<ucm740$2j5e4$1@dont-email.me>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <401e5a1f-91f2-4075-a910-ee8455b0fd93n@googlegroups.com>
Subject: Re: C++ to Fortran
From: gah4@u.washington.edu (gah4)
Injection-Date: Wed, 30 Aug 2023 17:13:42 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Received-Bytes: 4131
 by: gah4 - Wed, 30 Aug 2023 17:13 UTC

On Tuesday, August 29, 2023 at 6:47:49 PM UTC-7, Gary Scott wrote:

(snip, I wrote)

> > It is then possible to write OO code in C, though with a little extra work that
> > you don't need to do with C++.

> Isn't a single derived type an "OO" concept? I'm still not a fan of
> derived types for procedure arguments (e.g. the win32 API...yuck). I
> use the extensively for internal "global/common" purposes though.

As well as I know it, derived types are related to structures in some other
languages. I first knew them in PL/I, where I believe they came from COBOL..

I believe the Fortran standard also uses the word structure, so I sometimes
call them that.

I don't know the history of OO, and especially when the actual term originated.
I do remember someone telling me about Simula sometime before I knew
about C, though wasn't interested at the time.

I also don't know the history of COBOL so well, but it does seem that they idea
of keeping disparate date together is important.

Looking at it now, you have to wonder what took Fortran so long.

But a common idea in a COBOL program might be the information about
an employee, such as name and salary, that would be kept together.
They would then be read from a file (or in the early days, card) together,
and operated on sometimes as a unit.

PL/I has stream and record I/O, where STREAM corresponds to Fortran
FORMATTED, and RECORD to Fortran UNFORMATTED. RECORD I/O
statements only read/write one variable, which is commonly a structure.
I believe that also came from COBOL.

Note that is especially convenient for I/O, as the data is together.
In the usual case, it can be copied to/from byte by byte, without knowing
what the data type is.

PL/I also has locate-mode I/O, where you access data directly in the I/O
buffer, saving the need to copy it. I suspect also from COBOL, though
I don't know that one.

Also, COBOL only has one-dimensional arrays. But you can have arrays
of structures of arrays of ..., so the effect of higher dimensions.
PL/I has, I believe again from COBOL, some convenience in array access.

If you have a structure array that might be accessed as x(i).y(j).z(k), the
compiler can figure it out if you instead say: x.y.z(i, j, k).
Even more, assuming it is not ambiguous, partial qualification
allows for z(i, j, k) where the compiler assumes the x.y. part.
(PL/I allows for multiple dimensions, but also moving subscripts
around and partial qualification.)

It seems that some of the OO ideas might have originated in COBOL,
and slowly spread until they got named, into other languages.

Re: C++ to Fortran

<COBOL-20230830182720@ram.dialup.fu-berlin.de>

  copy mid

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

  copy link   Newsgroups: comp.lang.fortran
Path: i2pn2.org!i2pn.org!news.swapon.de!fu-berlin.de!uni-berlin.de!not-for-mail
From: ram@zedat.fu-berlin.de (Stefan Ram)
Newsgroups: comp.lang.fortran
Subject: Re: C++ to Fortran
Date: 30 Aug 2023 17:30:32 GMT
Organization: Stefan Ram
Lines: 32
Expires: 1 Sep 2024 11:59:58 GMT
Message-ID: <COBOL-20230830182720@ram.dialup.fu-berlin.de>
References: <uchpsj$1ku9u$1@dont-email.me> <5fbb8dcc-d5b9-45a4-9d4f-23caeebc0778n@googlegroups.com> <uckut5$29p0c$1@dont-email.me> <9b605c0b-c8a1-40eb-a73f-428377f906a5n@googlegroups.com> <ee5025c7-3121-4e6d-87a9-f54452f1c145n@googlegroups.com> <258c15c6-7463-4d80-8326-0016c5a4ff1an@googlegroups.com> <ucm740$2j5e4$1@dont-email.me> <401e5a1f-91f2-4075-a910-ee8455b0fd93n@googlegroups.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Trace: news.uni-berlin.de CvnXzx2yG4YLYChgMkur6gxmiDDwgk/u6rh8FRoImLS01J
Cancel-Lock: sha1:0oDDXomspxeZTSs9O16Aq+Zrd9c= sha256:Pv8M3vdB49yYFkCZaevMSFOcsEzUNvQ6ukE3CbgWoJ4=
X-Copyright: (C) Copyright 2023 Stefan Ram. All rights reserved.
Distribution through any means other than regular usenet
channels is forbidden. It is forbidden to publish this
article in the Web, to change URIs of this article into links,
and to transfer the body without this notice, but quotations
of parts in other Usenet posts are allowed.
X-No-Archive: Yes
Archive: no
X-No-Archive-Readme: "X-No-Archive" is set, because this prevents some
services to mirror the article in the web. But the article may
be kept on a Usenet archive server with only NNTP access.
X-No-Html: yes
Content-Language: en-US
Accept-Language: de-DE-1901, en-US, it, fr-FR
 by: Stefan Ram - Wed, 30 Aug 2023 17:30 UTC

gah4 <gah4@u.washington.edu> writes:
>I don't know the history of OO, and especially when the
>actual term originated.

While Simula actually implemented many ideas of OOP,
the term "object-oriented" was coined by Alan Kay.

Since C++ was mentioned in this discussion, I have to
quote Alan Kay:

|I invented the term "object-oriented" and I can tell you I did
|not have C++ in mind.

.

>It seems that some of the OO ideas might have originated in COBOL,
>and slowly spread until they got named, into other languages.

COBOL indeed is know for its "computerization of business records"
(Sebasta). But this is not OOP.

Crucial parts of OOP that are still missing from records are:

- abstract data types, that allow to hide implementation details;

- polymorphism, that allows abstract calls (i.e., when the call
is written, the type of the object is not specified); and

- code organization that make it easy to add new types (while
procedural programming makes it easy to add new procedures).

Re: C++ to Fortran

<uco4au$2rllp$1@dont-email.me>

  copy mid

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

  copy link   Newsgroups: comp.lang.fortran
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: garylscott@sbcglobal.net (Gary Scott)
Newsgroups: comp.lang.fortran
Subject: Re: C++ to Fortran
Date: Wed, 30 Aug 2023 14:12:30 -0500
Organization: A noiseless patient Spider
Lines: 25
Message-ID: <uco4au$2rllp$1@dont-email.me>
References: <uchpsj$1ku9u$1@dont-email.me>
<5fbb8dcc-d5b9-45a4-9d4f-23caeebc0778n@googlegroups.com>
<uckut5$29p0c$1@dont-email.me>
<9b605c0b-c8a1-40eb-a73f-428377f906a5n@googlegroups.com>
<ee5025c7-3121-4e6d-87a9-f54452f1c145n@googlegroups.com>
<258c15c6-7463-4d80-8326-0016c5a4ff1an@googlegroups.com>
<ucm740$2j5e4$1@dont-email.me>
<401e5a1f-91f2-4075-a910-ee8455b0fd93n@googlegroups.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Wed, 30 Aug 2023 19:12:31 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="947d0d04d3d0ce0772b583ba42ede6d5";
logging-data="3004089"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/E137a2/62xYpdzyh++mLrpMqB4Z7KIvY="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:hEb9zTPeS28sVCIjGTW1Yz92sDk=
Content-Language: en-US
In-Reply-To: <401e5a1f-91f2-4075-a910-ee8455b0fd93n@googlegroups.com>
 by: Gary Scott - Wed, 30 Aug 2023 19:12 UTC

On 8/30/2023 12:13 PM, gah4 wrote:
> On Tuesday, August 29, 2023 at 6:47:49 PM UTC-7, Gary Scott wrote:
>
> (snip, I wrote)
>
>>> It is then possible to write OO code in C, though with a little extra work that
>>> you don't need to do with C++.
>
>> Isn't a single derived type an "OO" concept? I'm still not a fan of
>> derived types for procedure arguments (e.g. the win32 API...yuck). I
>> use the extensively for internal "global/common" purposes though.
>
> As well as I know it, derived types are related to structures in some other
> languages. I first knew them in PL/I, where I believe they came from COBOL.
>
> I believe the Fortran standard also uses the word structure, so I sometimes
> call them that.
>
> I don't know the history of OO, and especially when the actual term originated.
> I do remember someone telling me about Simula sometime before I knew
> about C, though wasn't interested at the time.
> SNIP

Smalltalk was the more influential.

Re: C++ to Fortran

<eabf4377-0ba6-432f-84ef-efd9fbf5e5a2n@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.fortran
X-Received: by 2002:a05:620a:858c:b0:76f:2990:2d88 with SMTP id pf12-20020a05620a858c00b0076f29902d88mr15013qkn.9.1693424307142;
Wed, 30 Aug 2023 12:38:27 -0700 (PDT)
X-Received: by 2002:a05:6808:1b13:b0:3a3:d677:9a8d with SMTP id
bx19-20020a0568081b1300b003a3d6779a8dmr292930oib.0.1693424306617; Wed, 30 Aug
2023 12:38:26 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!usenet.blueworldhosting.com!diablo1.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: Wed, 30 Aug 2023 12:38:26 -0700 (PDT)
In-Reply-To: <uco4au$2rllp$1@dont-email.me>
Injection-Info: google-groups.googlegroups.com; posting-host=2601:602:9700:4689:4c34:b8ed:f322:cf32;
posting-account=gLDX1AkAAAA26M5HM-O3sVMAXdxK9FPA
NNTP-Posting-Host: 2601:602:9700:4689:4c34:b8ed:f322:cf32
References: <uchpsj$1ku9u$1@dont-email.me> <5fbb8dcc-d5b9-45a4-9d4f-23caeebc0778n@googlegroups.com>
<uckut5$29p0c$1@dont-email.me> <9b605c0b-c8a1-40eb-a73f-428377f906a5n@googlegroups.com>
<ee5025c7-3121-4e6d-87a9-f54452f1c145n@googlegroups.com> <258c15c6-7463-4d80-8326-0016c5a4ff1an@googlegroups.com>
<ucm740$2j5e4$1@dont-email.me> <401e5a1f-91f2-4075-a910-ee8455b0fd93n@googlegroups.com>
<uco4au$2rllp$1@dont-email.me>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <eabf4377-0ba6-432f-84ef-efd9fbf5e5a2n@googlegroups.com>
Subject: Re: C++ to Fortran
From: gah4@u.washington.edu (gah4)
Injection-Date: Wed, 30 Aug 2023 19:38:27 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Received-Bytes: 2267
 by: gah4 - Wed, 30 Aug 2023 19:38 UTC

On Wednesday, August 30, 2023 at 12:12:35 PM UTC-7, Gary Scott wrote:

(snip, I wrote)
> > I don't know the history of OO, and especially when the actual term originated.
> > I do remember someone telling me about Simula sometime before I knew
> > about C, though wasn't interested at the time.

> SNIP
>
> Smalltalk was the more influential.

https://en.wikipedia.org/wiki/Simula

seems to suggest that Simula influenced Smalltalk, and originate the
object oriented ideas.

https://en.wikipedia.org/wiki/Record_(computer_science)

attributes the idea of a record to punched card days, and the idea of
programming language support for, the structure data type
to COBOL.

Re: C++ to Fortran

<ucon9m$2ugas$1@dont-email.me>

  copy mid

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

  copy link   Newsgroups: comp.lang.fortran
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: lynnmcguire5@gmail.com (Lynn McGuire)
Newsgroups: comp.lang.fortran
Subject: Re: C++ to Fortran
Date: Wed, 30 Aug 2023 19:36:06 -0500
Organization: A noiseless patient Spider
Lines: 37
Message-ID: <ucon9m$2ugas$1@dont-email.me>
References: <uchpsj$1ku9u$1@dont-email.me>
<5fbb8dcc-d5b9-45a4-9d4f-23caeebc0778n@googlegroups.com>
<uckut5$29p0c$1@dont-email.me>
<9b605c0b-c8a1-40eb-a73f-428377f906a5n@googlegroups.com>
<ee5025c7-3121-4e6d-87a9-f54452f1c145n@googlegroups.com>
<258c15c6-7463-4d80-8326-0016c5a4ff1an@googlegroups.com>
<ucm740$2j5e4$1@dont-email.me>
<401e5a1f-91f2-4075-a910-ee8455b0fd93n@googlegroups.com>
<uco4au$2rllp$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Thu, 31 Aug 2023 00:36:07 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="047f82f07f09bba2da1a2855181c0f1c";
logging-data="3096924"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/Fyzd/4YoqacNKI/tuMYlWWlbFZ11+Nq4="
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101
Thunderbird/102.14.0
Cancel-Lock: sha1:7zuh6rCF+mL0t7v1Ce2jiPfhR30=
Content-Language: en-US
In-Reply-To: <uco4au$2rllp$1@dont-email.me>
 by: Lynn McGuire - Thu, 31 Aug 2023 00:36 UTC

On 8/30/2023 2:12 PM, Gary Scott wrote:
> On 8/30/2023 12:13 PM, gah4 wrote:
>> On Tuesday, August 29, 2023 at 6:47:49 PM UTC-7, Gary Scott wrote:
>>
>> (snip, I wrote)
>>
>>>> It is then possible to write OO code in C, though with a little
>>>> extra work that
>>>> you don't need to do with C++.
>>
>>> Isn't a single derived type an "OO" concept? I'm still not a fan of
>>> derived types for procedure arguments (e.g. the win32 API...yuck). I
>>> use the extensively for internal "global/common" purposes though.
>>
>> As well as I know it, derived types are related to structures in some
>> other
>> languages.  I first knew them in PL/I, where I believe they came from
>> COBOL.
>>
>> I believe the Fortran standard also uses the word structure, so I
>> sometimes
>> call them that.
>>
>> I don't know the history of OO, and especially when the actual term
>> originated.
>> I do remember someone telling me about Simula sometime before I knew
>> about C, though wasn't interested at the time.
>> SNIP
>
> Smalltalk was the more influential.

We used to have an app written in Smalltalk. C++ and F77 run about 100X
faster than Smalltalk. I converted our Smalltalk app to C++ and never
looked back.

Lynn

Re: C++ to Fortran

<1d7b21e4-fdd6-4977-bd4e-d923977629bfn@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.fortran
X-Received: by 2002:a05:620a:9008:b0:76e:f8bb:ff6 with SMTP id rk8-20020a05620a900800b0076ef8bb0ff6mr27828qkn.0.1693449899775;
Wed, 30 Aug 2023 19:44:59 -0700 (PDT)
X-Received: by 2002:a05:6870:c78b:b0:1bf:817a:633d with SMTP id
dy11-20020a056870c78b00b001bf817a633dmr545732oab.0.1693449899487; Wed, 30 Aug
2023 19:44:59 -0700 (PDT)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!diablo1.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: Wed, 30 Aug 2023 19:44:58 -0700 (PDT)
In-Reply-To: <401e5a1f-91f2-4075-a910-ee8455b0fd93n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=49.185.182.3; posting-account=L5wwzgoAAAAfQcZzW8eLJKqyFogVIeWA
NNTP-Posting-Host: 49.185.182.3
References: <uchpsj$1ku9u$1@dont-email.me> <5fbb8dcc-d5b9-45a4-9d4f-23caeebc0778n@googlegroups.com>
<uckut5$29p0c$1@dont-email.me> <9b605c0b-c8a1-40eb-a73f-428377f906a5n@googlegroups.com>
<ee5025c7-3121-4e6d-87a9-f54452f1c145n@googlegroups.com> <258c15c6-7463-4d80-8326-0016c5a4ff1an@googlegroups.com>
<ucm740$2j5e4$1@dont-email.me> <401e5a1f-91f2-4075-a910-ee8455b0fd93n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <1d7b21e4-fdd6-4977-bd4e-d923977629bfn@googlegroups.com>
Subject: Re: C++ to Fortran
From: robin51@dodo.com.au (robin vowels)
Injection-Date: Thu, 31 Aug 2023 02:44:59 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Received-Bytes: 4735
 by: robin vowels - Thu, 31 Aug 2023 02:44 UTC

On Thursday, 31 August 2023 at 03:13:45 UTC+10, gah4 wrote:
> On Tuesday, August 29, 2023 at 6:47:49 PM UTC-7, Gary Scott wrote:
>
> (snip, I wrote)
> > > It is then possible to write OO code in C, though with a little extra work that
> > > you don't need to do with C++.
>
> > Isn't a single derived type an "OO" concept? I'm still not a fan of
> > derived types for procedure arguments (e.g. the win32 API...yuck). I
> > use the extensively for internal "global/common" purposes though.
> As well as I know it, derived types are related to structures in some other
> languages. I first knew them in PL/I, where I believe they came from COBOL.
>
> I believe the Fortran standard also uses the word structure, so I sometimes
> call them that.
>
> I don't know the history of OO, and especially when the actual term originated.
> I do remember someone telling me about Simula sometime before I knew
> about C, though wasn't interested at the time.
>
> I also don't know the history of COBOL so well, but it does seem that they idea
> of keeping disparate date together is important.
>
> Looking at it now, you have to wonder what took Fortran so long.
>
> But a common idea in a COBOL program might be the information about
> an employee, such as name and salary, that would be kept together.
> They would then be read from a file (or in the early days, card) together,
> and operated on sometimes as a unit.
>
> PL/I has stream and record I/O, where STREAM corresponds to Fortran
> FORMATTED, and RECORD to Fortran UNFORMATTED. RECORD I/O
> statements only read/write one variable, which is commonly a structure.
> I believe that also came from COBOL.
>
> Note that is especially convenient for I/O, as the data is together.
> In the usual case, it can be copied to/from byte by byte, without knowing
> what the data type is.
>
> PL/I also has locate-mode I/O, where you access data directly in the I/O
> buffer, saving the need to copy it. I suspect also from COBOL, though
> I don't know that one.
>
> Also, COBOL only has one-dimensional arrays. But you can have arrays
> of structures of arrays of ..., so the effect of higher dimensions.
> PL/I has, I believe again from COBOL, some convenience in array access.
..
Multidimensional arrays in PL/I came from FORTRAN and ALGOL,
but whole array operations and cross-sections of arrays were a
new concept that came with IBM's first PL/I compiler in c, 1966.
..
The latter features were adopted 25 years later into Fortran 90.
..
> If you have a structure array that might be accessed as x(i).y(j).z(k), the
> compiler can figure it out if you instead say: x.y.z(i, j, k).
> Even more, assuming it is not ambiguous, partial qualification
> allows for z(i, j, k) where the compiler assumes the x.y. part.
> (PL/I allows for multiple dimensions, but also moving subscripts
> around and partial qualification.)
>
> It seems that some of the OO ideas might have originated in COBOL,
> and slowly spread until they got named, into other languages.

Re: C++ to Fortran

<9b39c5f8-bcb9-4ef2-8b1b-cc0a6ec4e5een@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.fortran
X-Received: by 2002:a05:620a:2692:b0:76c:be58:d76e with SMTP id c18-20020a05620a269200b0076cbe58d76emr38849qkp.0.1693452591083;
Wed, 30 Aug 2023 20:29:51 -0700 (PDT)
X-Received: by 2002:a05:6214:14aa:b0:64a:24a4:3b9a with SMTP id
bo10-20020a05621414aa00b0064a24a43b9amr37915qvb.4.1693452590925; Wed, 30 Aug
2023 20:29:50 -0700 (PDT)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!diablo1.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: Wed, 30 Aug 2023 20:29:50 -0700 (PDT)
In-Reply-To: <1d7b21e4-fdd6-4977-bd4e-d923977629bfn@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=2601:602:9700:4689:791f:f23c:5cac:8966;
posting-account=gLDX1AkAAAA26M5HM-O3sVMAXdxK9FPA
NNTP-Posting-Host: 2601:602:9700:4689:791f:f23c:5cac:8966
References: <uchpsj$1ku9u$1@dont-email.me> <5fbb8dcc-d5b9-45a4-9d4f-23caeebc0778n@googlegroups.com>
<uckut5$29p0c$1@dont-email.me> <9b605c0b-c8a1-40eb-a73f-428377f906a5n@googlegroups.com>
<ee5025c7-3121-4e6d-87a9-f54452f1c145n@googlegroups.com> <258c15c6-7463-4d80-8326-0016c5a4ff1an@googlegroups.com>
<ucm740$2j5e4$1@dont-email.me> <401e5a1f-91f2-4075-a910-ee8455b0fd93n@googlegroups.com>
<1d7b21e4-fdd6-4977-bd4e-d923977629bfn@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <9b39c5f8-bcb9-4ef2-8b1b-cc0a6ec4e5een@googlegroups.com>
Subject: Re: C++ to Fortran
From: gah4@u.washington.edu (gah4)
Injection-Date: Thu, 31 Aug 2023 03:29:51 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Received-Bytes: 2211
 by: gah4 - Thu, 31 Aug 2023 03:29 UTC

On Wednesday, August 30, 2023 at 7:45:01 PM UTC-7, robin vowels wrote:

(snip)

> Multidimensional arrays in PL/I came from FORTRAN and ALGOL,
> but whole array operations and cross-sections of arrays were a
> new concept that came with IBM's first PL/I compiler in c, 1966.
> The latter features were adopted 25 years later into Fortran 90.
Which reminds me of one PL/I feature that Fortran still doesn't have:

Structure expressions.

You can do operations on structures, either by structure shape,
so member by member, or by member name.

Neither has made it to Fortran.

Re: C++ to Fortran

<ucqqs5$3dqjh$5@dont-email.me>

  copy mid

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

  copy link   Newsgroups: comp.lang.fortran
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: lynnmcguire5@gmail.com (Lynn McGuire)
Newsgroups: comp.lang.fortran
Subject: Re: C++ to Fortran
Date: Thu, 31 Aug 2023 14:49:23 -0500
Organization: A noiseless patient Spider
Lines: 30
Message-ID: <ucqqs5$3dqjh$5@dont-email.me>
References: <uchpsj$1ku9u$1@dont-email.me>
<5fbb8dcc-d5b9-45a4-9d4f-23caeebc0778n@googlegroups.com>
<uckut5$29p0c$1@dont-email.me>
<9b605c0b-c8a1-40eb-a73f-428377f906a5n@googlegroups.com>
<ee5025c7-3121-4e6d-87a9-f54452f1c145n@googlegroups.com>
<258c15c6-7463-4d80-8326-0016c5a4ff1an@googlegroups.com>
<ucm740$2j5e4$1@dont-email.me>
<401e5a1f-91f2-4075-a910-ee8455b0fd93n@googlegroups.com>
<1d7b21e4-fdd6-4977-bd4e-d923977629bfn@googlegroups.com>
<9b39c5f8-bcb9-4ef2-8b1b-cc0a6ec4e5een@googlegroups.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Thu, 31 Aug 2023 19:49:25 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="047f82f07f09bba2da1a2855181c0f1c";
logging-data="3598961"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18y+v9ab6PbKY4guDiRN+a/ZamBAnJRb+Q="
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101
Thunderbird/102.15.0
Cancel-Lock: sha1:j7L0iZElAgcdeWnQ9j93NYDDcYo=
In-Reply-To: <9b39c5f8-bcb9-4ef2-8b1b-cc0a6ec4e5een@googlegroups.com>
Content-Language: en-US
 by: Lynn McGuire - Thu, 31 Aug 2023 19:49 UTC

On 8/30/2023 10:29 PM, gah4 wrote:
> On Wednesday, August 30, 2023 at 7:45:01 PM UTC-7, robin vowels wrote:
>
> (snip)
>
>> Multidimensional arrays in PL/I came from FORTRAN and ALGOL,
>> but whole array operations and cross-sections of arrays were a
>> new concept that came with IBM's first PL/I compiler in c, 1966.
>
>> The latter features were adopted 25 years later into Fortran 90.
>
> Which reminds me of one PL/I feature that Fortran still doesn't have:
>
> Structure expressions.
>
> You can do operations on structures, either by structure shape,
> so member by member, or by member name.
>
> Neither has made it to Fortran.

I am confused, what are structure expressions ?

Just about every Fortran compiler supports the old Dec Structures from
the 1970s that never made it into the official language definition. I
am removing them from our code right now in fact as a part of my 4th
Intel Fortran port.

Lynn

Re: C++ to Fortran

<dbba28ef-801e-48d4-b008-256d4dbc0f18n@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.fortran
X-Received: by 2002:a05:622a:1997:b0:40f:f22c:2a3b with SMTP id u23-20020a05622a199700b0040ff22c2a3bmr40334qtc.3.1693525460802;
Thu, 31 Aug 2023 16:44:20 -0700 (PDT)
X-Received: by 2002:a05:6a00:1792:b0:68c:42f2:e3dd with SMTP id
s18-20020a056a00179200b0068c42f2e3ddmr463828pfg.1.1693525460280; Thu, 31 Aug
2023 16:44:20 -0700 (PDT)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!peer01.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, 31 Aug 2023 16:44:19 -0700 (PDT)
In-Reply-To: <ucqqs5$3dqjh$5@dont-email.me>
Injection-Info: google-groups.googlegroups.com; posting-host=2601:602:9700:4689:8838:f51c:e05:950c;
posting-account=gLDX1AkAAAA26M5HM-O3sVMAXdxK9FPA
NNTP-Posting-Host: 2601:602:9700:4689:8838:f51c:e05:950c
References: <uchpsj$1ku9u$1@dont-email.me> <5fbb8dcc-d5b9-45a4-9d4f-23caeebc0778n@googlegroups.com>
<uckut5$29p0c$1@dont-email.me> <9b605c0b-c8a1-40eb-a73f-428377f906a5n@googlegroups.com>
<ee5025c7-3121-4e6d-87a9-f54452f1c145n@googlegroups.com> <258c15c6-7463-4d80-8326-0016c5a4ff1an@googlegroups.com>
<ucm740$2j5e4$1@dont-email.me> <401e5a1f-91f2-4075-a910-ee8455b0fd93n@googlegroups.com>
<1d7b21e4-fdd6-4977-bd4e-d923977629bfn@googlegroups.com> <9b39c5f8-bcb9-4ef2-8b1b-cc0a6ec4e5een@googlegroups.com>
<ucqqs5$3dqjh$5@dont-email.me>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <dbba28ef-801e-48d4-b008-256d4dbc0f18n@googlegroups.com>
Subject: Re: C++ to Fortran
From: gah4@u.washington.edu (gah4)
Injection-Date: Thu, 31 Aug 2023 23:44:20 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Received-Bytes: 2771
 by: gah4 - Thu, 31 Aug 2023 23:44 UTC

On Thursday, August 31, 2023 at 12:49:29 PM UTC-7, Lynn McGuire wrote:

(snip, I wrote)

> > You can do operations on structures, either by structure shape,
> > so member by member, or by member name.
> > Neither has made it to Fortran.

> I am confused, what are structure expressions ?
> Just about every Fortran compiler supports the old Dec Structures from
> the 1970s that never made it into the official language definition. I
> am removing them from our code right now in fact as a part of my 4th
> Intel Fortran port.
Like array expressions, except structures instead of arrays.

You can have:

A = B + C

where A, B, and C are arrays, added element by element.

PL/I will add structures member by member.
Or any other operation, as you would expect with arrays.

Y = SQRT(X)

F = SIN(G)**2 + COS(G)**2

It can make more or less sense, depending on the types of the members.

type :: vector
real :: x, y, z
end type

member by member operations should make enough sense in this case.

1
server_pubkey.txt

rocksolid light 0.9.81
clearnet tor