Rocksolid Light

Welcome to RetroBBS

mail  files  register  newsreader  groups  login

Message-ID:  

Xerox never comes up with anything original.


devel / comp.lang.fortran / Re: Tool for C++ 2 FORTRAN?

SubjectAuthor
* Tool for C++ 2 FORTRAN?Arjan
+* Re: Tool for C++ 2 FORTRAN?Sjouke Burry
|`* Re: Tool for C++ 2 FORTRAN?Arjan
| `- Re: Tool for C++ 2 FORTRAN?FortranFan
+- Re: Tool for C++ 2 FORTRAN?Thomas Koenig
`* Re: Tool for C++ 2 FORTRAN?Beliavsky
 `- Re: Tool for C++ 2 FORTRAN?David Duffy

1
Tool for C++ 2 FORTRAN?

<e97c20ac-7dc0-409c-856f-ad61916a7d64n@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.fortran
X-Received: by 2002:ad4:5be3:0:b0:461:d09e:115d with SMTP id k3-20020ad45be3000000b00461d09e115dmr33049131qvc.37.1653631349218;
Thu, 26 May 2022 23:02:29 -0700 (PDT)
X-Received: by 2002:a05:6902:1004:b0:64f:8ca3:511a with SMTP id
w4-20020a056902100400b0064f8ca3511amr28287126ybt.570.1653631349065; Thu, 26
May 2022 23:02:29 -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: Thu, 26 May 2022 23:02:28 -0700 (PDT)
Injection-Info: google-groups.googlegroups.com; posting-host=143.176.41.231; posting-account=1_ygcgoAAADwWPAPx__WrwRZW-DpAL--
NNTP-Posting-Host: 143.176.41.231
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <e97c20ac-7dc0-409c-856f-ad61916a7d64n@googlegroups.com>
Subject: Tool for C++ 2 FORTRAN?
From: arjan.van.dijk@rivm.nl (Arjan)
Injection-Date: Fri, 27 May 2022 06:02:29 +0000
Content-Type: text/plain; charset="UTF-8"
X-Received-Bytes: 1037
 by: Arjan - Fri, 27 May 2022 06:02 UTC

Hi, is there a good tool to convert a C++ project to FORTRAN?

Re: Tool for C++ 2 FORTRAN?

<nnd$02256e95$2955d02b@bc641d07cb2f609c>

  copy mid

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

  copy link   Newsgroups: comp.lang.fortran
Date: Fri, 27 May 2022 08:43:22 +0200
From: burrynulnulfour@ppllaanneett.nnll (Sjouke Burry)
User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:17.0) Gecko/20131118 Thunderbird/17.0.11
MIME-Version: 1.0
Newsgroups: comp.lang.fortran
Subject: Re: Tool for C++ 2 FORTRAN?
References: <e97c20ac-7dc0-409c-856f-ad61916a7d64n@googlegroups.com>
In-Reply-To: <e97c20ac-7dc0-409c-856f-ad61916a7d64n@googlegroups.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Message-ID: <nnd$02256e95$2955d02b@bc641d07cb2f609c>
Organization: KPN B.V.
Path: i2pn2.org!i2pn.org!aioe.org!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!peer01.ams4!peer.am4.highwinds-media.com!news.highwinds-media.com!feed.abavia.com!abe004.abavia.com!abp001.abavia.com!news.kpn.nl!not-for-mail
Lines: 6
Injection-Date: Fri, 27 May 2022 08:43:22 +0200
Injection-Info: news.kpn.nl; mail-complaints-to="abuse@kpn.com"
X-Received-Bytes: 1038
 by: Sjouke Burry - Fri, 27 May 2022 06:43 UTC

On 27.05.22 8:02, Arjan wrote:
> Hi, is there a good tool to convert a C++ project to FORTRAN?
>
Try a human brain.
Those things can be very useful.

Re: Tool for C++ 2 FORTRAN?

<2f876512-91e0-4654-8cf4-5373383c58f5n@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.fortran
X-Received: by 2002:a05:620a:4589:b0:6a4:2e05:9f50 with SMTP id bp9-20020a05620a458900b006a42e059f50mr13837765qkb.747.1653637537441;
Fri, 27 May 2022 00:45:37 -0700 (PDT)
X-Received: by 2002:a05:6902:352:b0:64e:8f8:d552 with SMTP id
e18-20020a056902035200b0064e08f8d552mr38834727ybs.540.1653637537168; Fri, 27
May 2022 00:45:37 -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, 27 May 2022 00:45:36 -0700 (PDT)
In-Reply-To: <nnd$02256e95$2955d02b@bc641d07cb2f609c>
Injection-Info: google-groups.googlegroups.com; posting-host=143.176.41.231; posting-account=1_ygcgoAAADwWPAPx__WrwRZW-DpAL--
NNTP-Posting-Host: 143.176.41.231
References: <e97c20ac-7dc0-409c-856f-ad61916a7d64n@googlegroups.com> <nnd$02256e95$2955d02b@bc641d07cb2f609c>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <2f876512-91e0-4654-8cf4-5373383c58f5n@googlegroups.com>
Subject: Re: Tool for C++ 2 FORTRAN?
From: arjan.van.dijk@rivm.nl (Arjan)
Injection-Date: Fri, 27 May 2022 07:45:37 +0000
Content-Type: text/plain; charset="UTF-8"
X-Received-Bytes: 1564
 by: Arjan - Fri, 27 May 2022 07:45 UTC

Op vrijdag 27 mei 2022 om 08:43:26 UTC+2 schreef Sjouke Burry:
> On 27.05.22 8:02, Arjan wrote:
> > Hi, is there a good tool to convert a C++ project to FORTRAN?
> >
> Try a human brain.
> Those things can be very useful.

Of course.
But:
1: My brain does not have the knowledge yet and I miss the time to learn C++.
2: My project does not have the means to hire a person with a qualified brain.

A.

Re: Tool for C++ 2 FORTRAN?

<t6q70g$56s$1@newsreader4.netcologne.de>

  copy mid

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

  copy link   Newsgroups: comp.lang.fortran
Path: i2pn2.org!i2pn.org!aioe.org!news.uzoreto.com!newsreader4.netcologne.de!news.netcologne.de!.POSTED.2001-4dd7-c475-0-7285-c2ff-fe6c-992d.ipv6dyn.netcologne.de!not-for-mail
From: tkoenig@netcologne.de (Thomas Koenig)
Newsgroups: comp.lang.fortran
Subject: Re: Tool for C++ 2 FORTRAN?
Date: Fri, 27 May 2022 09:52:16 -0000 (UTC)
Organization: news.netcologne.de
Distribution: world
Message-ID: <t6q70g$56s$1@newsreader4.netcologne.de>
References: <e97c20ac-7dc0-409c-856f-ad61916a7d64n@googlegroups.com>
Injection-Date: Fri, 27 May 2022 09:52:16 -0000 (UTC)
Injection-Info: newsreader4.netcologne.de; posting-host="2001-4dd7-c475-0-7285-c2ff-fe6c-992d.ipv6dyn.netcologne.de:2001:4dd7:c475:0:7285:c2ff:fe6c:992d";
logging-data="5340"; mail-complaints-to="abuse@netcologne.de"
User-Agent: slrn/1.0.3 (Linux)
 by: Thomas Koenig - Fri, 27 May 2022 09:52 UTC

Arjan <arjan.van.dijk@rivm.nl> schrieb:
> Hi, is there a good tool to convert a C++ project to FORTRAN?

My guess would be that it is almost impossible to do in a way
that is possible except at a very low level that it would be almost
iimpossible to maintain.

Consider one C++ feature, multiple inheritance - Fortran does
not have it (which is good), and there is no really clear way to
model it, unless you construct your vtabs by hand.

Re: Tool for C++ 2 FORTRAN?

<c52b1411-ae72-4bcd-b78d-8f0e18c4b149n@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.fortran
X-Received: by 2002:a05:6214:2485:b0:462:4bf3:a817 with SMTP id gi5-20020a056214248500b004624bf3a817mr19621212qvb.82.1653671426099;
Fri, 27 May 2022 10:10:26 -0700 (PDT)
X-Received: by 2002:a25:31c2:0:b0:641:660f:230f with SMTP id
x185-20020a2531c2000000b00641660f230fmr40835073ybx.472.1653671425846; Fri, 27
May 2022 10:10:25 -0700 (PDT)
Path: i2pn2.org!i2pn.org!aioe.org!news.mixmin.net!proxad.net!feeder1-2.proxad.net!209.85.160.216.MISMATCH!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.fortran
Date: Fri, 27 May 2022 10:10:25 -0700 (PDT)
In-Reply-To: <2f876512-91e0-4654-8cf4-5373383c58f5n@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: <e97c20ac-7dc0-409c-856f-ad61916a7d64n@googlegroups.com>
<nnd$02256e95$2955d02b@bc641d07cb2f609c> <2f876512-91e0-4654-8cf4-5373383c58f5n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <c52b1411-ae72-4bcd-b78d-8f0e18c4b149n@googlegroups.com>
Subject: Re: Tool for C++ 2 FORTRAN?
From: parekhvs@gmail.com (FortranFan)
Injection-Date: Fri, 27 May 2022 17:10:26 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
 by: FortranFan - Fri, 27 May 2022 17:10 UTC

On Friday, May 27, 2022 at 3:45:38 AM UTC-4, Arjan wrote:
> Op vrijdag 27 mei 2022 om 08:43:26 UTC+2 schreef Sjouke Burry:
> > On 27.05.22 8:02, Arjan wrote:
> > > Hi, is there a good tool to convert a C++ project to FORTRAN?
> > >
> > Try a human brain.
> > Those things can be very useful.
> Of course.
> But:
> 1: My brain does not have the knowledge yet and I miss the time to learn C++.
> 2: My project does not have the means to hire a person with a qualified brain.
>
> A.

@Arjan,

First, a question: why "2 FORTRAN"?! Staring with ISO IEC standard document for this programming revision published in 1991, it has been "Fortran" e.g., the so-called "Fortran 90" revision to refer to that 1991 publication.

`FORTRAN` might come across as implying your interest in working with a prior version, say FORTRAN 77 and its nonstandard extensions. In year 2022, those who wish to work with such `FORTRAN` will be fewer in numbers!!

Secondly, you may want to consider "crowdsourcing" such an effort instead of seeking a tool.

For example, you can start a project on GitHub where you post the C++ code in question. Then you can request for help on this forum and also at the Fortran Discourse site (https://fortran-lang.discourse.group/) with translations to modern Fortran and chances are high several of the eager Fortran enthusiasts will chip away at the C++ code and assist with authoring modern Fortran incarnation of what this C++ code does.

I suggest you give that a try, if you can.

Re: Tool for C++ 2 FORTRAN?

<edfb97d2-2285-441e-a76e-162e0b38b9f5n@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.fortran
X-Received: by 2002:a37:6782:0:b0:6a3:43c2:609a with SMTP id b124-20020a376782000000b006a343c2609amr26853422qkc.527.1653672360083;
Fri, 27 May 2022 10:26:00 -0700 (PDT)
X-Received: by 2002:a81:9958:0:b0:300:44e0:58d0 with SMTP id
q85-20020a819958000000b0030044e058d0mr3496456ywg.498.1653672359923; Fri, 27
May 2022 10:25:59 -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, 27 May 2022 10:25:59 -0700 (PDT)
In-Reply-To: <e97c20ac-7dc0-409c-856f-ad61916a7d64n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=173.76.111.99; posting-account=Ac_J3QkAAABih73tf3Yz4sHazwGUM-hW
NNTP-Posting-Host: 173.76.111.99
References: <e97c20ac-7dc0-409c-856f-ad61916a7d64n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <edfb97d2-2285-441e-a76e-162e0b38b9f5n@googlegroups.com>
Subject: Re: Tool for C++ 2 FORTRAN?
From: beliavsky@aol.com (Beliavsky)
Injection-Date: Fri, 27 May 2022 17:26:00 +0000
Content-Type: text/plain; charset="UTF-8"
X-Received-Bytes: 1477
 by: Beliavsky - Fri, 27 May 2022 17:25 UTC

On Friday, May 27, 2022 at 2:02:31 AM UTC-4, Arjan wrote:
> Hi, is there a good tool to convert a C++ project to FORTRAN?

No, but you can create C interfaces to your code and call them from Fortran.
There are also tools such as SWIG https://github.com/swig-fortran and
shroud https://github.com/LLNL/shroud to make it easier to call C++
from Fortran.

Re: Tool for C++ 2 FORTRAN?

<t6ruaj$1cqr$1@gioia.aioe.org>

  copy mid

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

  copy link   Newsgroups: comp.lang.fortran
Path: i2pn2.org!i2pn.org!aioe.org!iwdZGrEEcEqxXO+mXrCKKA.user.46.165.242.75.POSTED!not-for-mail
From: davidD@qimr.edu.au (David Duffy)
Newsgroups: comp.lang.fortran
Subject: Re: Tool for C++ 2 FORTRAN?
Date: Sat, 28 May 2022 01:36:21 -0000 (UTC)
Organization: Aioe.org NNTP Server
Message-ID: <t6ruaj$1cqr$1@gioia.aioe.org>
References: <e97c20ac-7dc0-409c-856f-ad61916a7d64n@googlegroups.com> <edfb97d2-2285-441e-a76e-162e0b38b9f5n@googlegroups.com>
Injection-Info: gioia.aioe.org; logging-data="45915"; posting-host="iwdZGrEEcEqxXO+mXrCKKA.user.gioia.aioe.org"; mail-complaints-to="abuse@aioe.org";
User-Agent: tin/2.4.4-20191224 ("Millburn") (Linux/5.4.0-113-generic (x86_64))
X-Notice: Filtered by postfilter v. 0.9.2
 by: David Duffy - Sat, 28 May 2022 01:36 UTC

Beliavsky <beliavsky@aol.com> wrote:
> Hi, is there a good tool to convert a C++ project to FORTRAN?

The Rose Compiler knows Fortran and C++ and can translate backwards and
forwards between languages. They don't give any examples specifically
for C++ to Fortran, as it seems to be more a toolkit or framework
for rolling your own:

https://github.com/rose-compiler/rose/wiki/How-to-create-a-translator

1
server_pubkey.txt

rocksolid light 0.9.81
clearnet tor