Rocksolid Light

Welcome to RetroBBS

mail  files  register  newsreader  groups  login

Message-ID:  

fortune: cannot execute. Out of cookies.


devel / comp.lang.fortran / Re: converting a 700,000+ line Fortran 77 plus 50,000+ line C++ program to C++, part 1

SubjectAuthor
* converting a 700,000+ line Fortran 77 plus 50,000+ line C++ programLynn McGuire
+* Re: converting a 700,000+ line Fortran 77 plus 50,000+ line C++Jeff Ryman
|+- Re: converting a 700,000+ line Fortran 77 plus 50,000+ line C++gah4
|`* Re: converting a 700,000+ line Fortran 77 plus 50,000+ line C++Lynn McGuire
| +* Re: converting a 700,000+ line Fortran 77 plus 50,000+ line C++gah4
| |+* Re: converting a 700,000+ line Fortran 77 plus 50,000+ line C++Lynn McGuire
| ||+* Re: converting a 700,000+ line Fortran 77 plus 50,000+ line C++Robin Vowels
| |||`* Re: converting a 700,000+ line Fortran 77 plus 50,000+ line C++Lynn McGuire
| ||| `* Re: converting a 700,000+ line Fortran 77 plus 50,000+ line C++Thomas Koenig
| |||  `* Re: converting a 700,000+ line Fortran 77 plus 50,000+ line C++Lynn McGuire
| |||   `* Re: converting a 700,000+ line Fortran 77 plus 50,000+ line C++Gary Scott
| |||    `- Re: converting a 700,000+ line Fortran 77 plus 50,000+ line C++Lynn McGuire
| ||`* Re: converting a 700,000+ line Fortran 77 plus 50,000+ line C++ program to C++, Scott Lurndal
| || `- Re: converting a 700,000+ line Fortran 77 plus 50,000+ line C++Lynn McGuire
| |`- Re: converting a 700,000+ line Fortran 77 plus 50,000+ line C++Robin Vowels
| +* Re: converting a 700,000+ line Fortran 77 plus 50,000+ line C++Thomas Koenig
| |+- Re: converting a 700,000+ line Fortran 77 plus 50,000+ line C++Lynn McGuire
| |+- Re: converting a 700,000+ line Fortran 77 plus 50,000+ line C++gah4
| |`- Re: converting a 700,000+ line Fortran 77 plus 50,000+ line C++Lynn McGuire
| `- Re: converting a 700,000+ line Fortran 77 plus 50,000+ line C++Beliavsky
+* Re: converting a 700,000+ line Fortran 77 plus 50,000+ line C++Chris M. Thomasson
|`- Re: converting a 700,000+ line Fortran 77 plus 50,000+ line C++Lynn McGuire
`* Re: converting a 700,000+ line Fortran 77 plus 50,000+ line C++gah4
 `- Re: converting a 700,000+ line Fortran 77 plus 50,000+ line C++Lynn McGuire

1
converting a 700,000+ line Fortran 77 plus 50,000+ line C++ program to C++, part 1

<tj4egb$u68$1@gioia.aioe.org>

  copy mid

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

  copy link   Newsgroups: comp.lang.fortran comp.lang.c comp.lang.c++
Path: i2pn2.org!i2pn.org!aioe.org!mdf2aNOb2oCHynmZpuX5uw.user.46.165.242.91.POSTED!not-for-mail
From: lynnmcguire5@gmail.com (Lynn McGuire)
Newsgroups: comp.lang.fortran,comp.lang.c,comp.lang.c++
Subject: converting a 700,000+ line Fortran 77 plus 50,000+ line C++ program
to C++, part 1
Date: Sun, 23 Oct 2022 17:16:42 -0500
Organization: Aioe.org NNTP Server
Message-ID: <tj4egb$u68$1@gioia.aioe.org>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Info: gioia.aioe.org; logging-data="30920"; posting-host="mdf2aNOb2oCHynmZpuX5uw.user.gioia.aioe.org"; mail-complaints-to="abuse@aioe.org";
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101
Thunderbird/102.4.0
X-Notice: Filtered by postfilter v. 0.9.2
Content-Language: en-US
 by: Lynn McGuire - Sun, 23 Oct 2022 22:16 UTC

We are converting a 700,000+ Fortran 77 lines of code plus 50,000+ C++
lines of code engineering software product to C++. With all that code,
we produce four Win32 EXEs and three Win32 DLLs. My goal is to add four
Win64 EXEs and three Win64 DLLs to the product with the same
capabilities as the Win32 versions (console, windowed, Excel callable,
Excel embeddable). Plus support for Unicode named files and Unicode
file paths.

I am using a customized version of f2c at the moment to automate 60% to
80% of the conversion from F77 to C++. I have added support for
logical*8, changed the output file from *.c to *.cpp, added an include
for the Fable fem.hpp template library, removed the trailing underscores
from the subroutine and common block names, removed the ftnlen arguments
from the character arguments, converted all F77 comments to the //
instead of the /* */, and a few other items. If desired, I am willing
to post a copy of my modified f2c on my website with the source code.
https://netlib.org/f2c/
https://en.wikipedia.org/wiki/F2c

f2c does not get me totally there. The Fortran character strings were
poorly handled so they will probably needed fixing for proper sizing and
alignment. The i/o code is crap so I take the original F77 i/o code and
translate it by hand. The arrays in the argument list are still based
at an index of one so I convert those to base index of zero by hand.
All of the local and common block arrays were converted to a base index
of zero by f2c. I add the new *.cpp file to my Visual Studio project.
I then add the new function prototypes to my prototypes.h file and I add
any new common block structures to my commons.h file. I then compile
and fix until I get a clean compile.

I have converted over 8,000 lines of F77 code to C++ now. Several dozen
subroutines and several dozen common blocks. Most are compiling cleanly
in Visual C++ 2015. My limited testing is working well and I will
expand my testing when I hit 15,000 or 20,000 lines of F77 code
converted. I hoping to get a complete build of the smaller of the Win32
DLLs by the end of the year and a full build by next June. One of my
programmers thinks that we will be lucky to get a complete build by late
2024.

Lynn

Re: converting a 700,000+ line Fortran 77 plus 50,000+ line C++ program to C++, part 1

<84aed433-6586-41af-b3d0-28dd17f9450bn@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.fortran
X-Received: by 2002:ac8:59cb:0:b0:39a:dbc7:2424 with SMTP id f11-20020ac859cb000000b0039adbc72424mr37126314qtf.304.1666802318358;
Wed, 26 Oct 2022 09:38:38 -0700 (PDT)
X-Received: by 2002:ac8:5b4d:0:b0:39c:bcae:bf9 with SMTP id
n13-20020ac85b4d000000b0039cbcae0bf9mr37886642qtw.77.1666802318100; Wed, 26
Oct 2022 09:38:38 -0700 (PDT)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!feed1.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: Wed, 26 Oct 2022 09:38:37 -0700 (PDT)
In-Reply-To: <tj4egb$u68$1@gioia.aioe.org>
Injection-Info: google-groups.googlegroups.com; posting-host=50.20.125.31; posting-account=5z--qAoAAACnug7j_OOF1c_Rr7Nr64Gy
NNTP-Posting-Host: 50.20.125.31
References: <tj4egb$u68$1@gioia.aioe.org>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <84aed433-6586-41af-b3d0-28dd17f9450bn@googlegroups.com>
Subject: Re: converting a 700,000+ line Fortran 77 plus 50,000+ line C++
program to C++, part 1
From: rymanjc@outlook.com (Jeff Ryman)
Injection-Date: Wed, 26 Oct 2022 16:38:38 +0000
Content-Type: text/plain; charset="UTF-8"
X-Received-Bytes: 5103
 by: Jeff Ryman - Wed, 26 Oct 2022 16:38 UTC

On Sunday, October 23, 2022 at 3:16:48 PM UTC-7, Lynn McGuire wrote:
> We are converting a 700,000+ Fortran 77 lines of code plus 50,000+ C++
> lines of code engineering software product to C++. With all that code,
> we produce four Win32 EXEs and three Win32 DLLs. My goal is to add four
> Win64 EXEs and three Win64 DLLs to the product with the same
> capabilities as the Win32 versions (console, windowed, Excel callable,
> Excel embeddable). Plus support for Unicode named files and Unicode
> file paths.
>
> I am using a customized version of f2c at the moment to automate 60% to
> 80% of the conversion from F77 to C++. I have added support for
> logical*8, changed the output file from *.c to *.cpp, added an include
> for the Fable fem.hpp template library, removed the trailing underscores
> from the subroutine and common block names, removed the ftnlen arguments
> from the character arguments, converted all F77 comments to the //
> instead of the /* */, and a few other items. If desired, I am willing
> to post a copy of my modified f2c on my website with the source code.
> https://netlib.org/f2c/
> https://en.wikipedia.org/wiki/F2c
>
> f2c does not get me totally there. The Fortran character strings were
> poorly handled so they will probably needed fixing for proper sizing and
> alignment. The i/o code is crap so I take the original F77 i/o code and
> translate it by hand. The arrays in the argument list are still based
> at an index of one so I convert those to base index of zero by hand.
> All of the local and common block arrays were converted to a base index
> of zero by f2c. I add the new *.cpp file to my Visual Studio project.
> I then add the new function prototypes to my prototypes.h file and I add
> any new common block structures to my commons.h file. I then compile
> and fix until I get a clean compile.
>
> I have converted over 8,000 lines of F77 code to C++ now. Several dozen
> subroutines and several dozen common blocks. Most are compiling cleanly
> in Visual C++ 2015. My limited testing is working well and I will
> expand my testing when I hit 15,000 or 20,000 lines of F77 code
> converted. I hoping to get a complete build of the smaller of the Win32
> DLLs by the end of the year and a full build by next June. One of my
> programmers thinks that we will be lucky to get a complete build by late
> 2024.
>
> Lynn

I'm not trying to be a smart ass or a troll and I'm not trying to change your mind.
I'm wondering why you want to convert all of the F77 to C++ rather than to
modern Fortran that can call or be called from the existing C++ routines.

As a side note, I used to work for a group at Oak Ridge National Laboratory
(ORNL) that developed the SCALE code system that is used for nuclear analysis.
A lot of effort was spent many years ago converting it from F77 to Fortran 9x.
Now, after addition of a number of computer science trained staff to that group
over the years from the late 1990s to the present, everything is slowly being
converted to C++. A number of the SCALE codes are being changed to run on
massively parallel machines, but there are libraries for both Fortran and C++
available for such machines. I have my suspicions why they are converting but
that is irrelevant here.

Is there a reason such as availability of certain libraries or code efficiency that
you want to convert all your F77 code to C++?

The reason I am interested is that I have some old F77 code that ran on IBM
mainframes, Unix workstations, and DOS PCs which I want to document and
revive to run on Windows and Linux now that I am retired and have the time.

I had a C/C++ class in the late 1990s but never used any of it at work. I am
taking some online self study classes in C/C++ so that I can at least read a
little of existing codes and use it in my project if I find it useful.

Thanks for your consideration.

Jeff

Re: converting a 700,000+ line Fortran 77 plus 50,000+ line C++ program to C++, part 1

<f1e8ed71-74c3-4ca8-9dae-456e9484a4fen@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.fortran
X-Received: by 2002:a05:622a:170c:b0:39c:c8c4:71f5 with SMTP id h12-20020a05622a170c00b0039cc8c471f5mr38755328qtk.595.1666814132333;
Wed, 26 Oct 2022 12:55:32 -0700 (PDT)
X-Received: by 2002:a05:622a:1911:b0:3a4:f16c:6969 with SMTP id
w17-20020a05622a191100b003a4f16c6969mr3244036qtc.449.1666814132189; Wed, 26
Oct 2022 12:55:32 -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: Wed, 26 Oct 2022 12:55:31 -0700 (PDT)
In-Reply-To: <84aed433-6586-41af-b3d0-28dd17f9450bn@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=2601:602:9700:4689:d437:fb9d:6513:3069;
posting-account=gLDX1AkAAAA26M5HM-O3sVMAXdxK9FPA
NNTP-Posting-Host: 2601:602:9700:4689:d437:fb9d:6513:3069
References: <tj4egb$u68$1@gioia.aioe.org> <84aed433-6586-41af-b3d0-28dd17f9450bn@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <f1e8ed71-74c3-4ca8-9dae-456e9484a4fen@googlegroups.com>
Subject: Re: converting a 700,000+ line Fortran 77 plus 50,000+ line C++
program to C++, part 1
From: gah4@u.washington.edu (gah4)
Injection-Date: Wed, 26 Oct 2022 19:55:32 +0000
Content-Type: text/plain; charset="UTF-8"
X-Received-Bytes: 4261
 by: gah4 - Wed, 26 Oct 2022 19:55 UTC

On Wednesday, October 26, 2022 at 9:38:40 AM UTC-7, rym...@outlook.com wrote:
> On Sunday, October 23, 2022 at 3:16:48 PM UTC-7, Lynn McGuire wrote:
> > We are converting a 700,000+ Fortran 77 lines of code plus 50,000+ C++
> > lines of code engineering software product to C++.
(snip)

> I'm not trying to be a smart ass or a troll and I'm not trying to change your mind.
> I'm wondering why you want to convert all of the F77 to C++ rather than to
> modern Fortran that can call or be called from the existing C++ routines.
I suspect that there are many different reasons, so no easy answer.

> As a side note, I used to work for a group at Oak Ridge National Laboratory
> (ORNL) that developed the SCALE code system that is used for nuclear analysis.
> A lot of effort was spent many years ago converting it from F77 to Fortran 9x.

So, converting Fortran 66 style DO loops to DO/ENDDO, and IF to
IF/THEN/ELSE? Or to array expressions instead of loops?

That can make it a lot more readable, but not so much more.

Does it also now use dynamically allocated memory?

> Now, after addition of a number of computer science trained staff to that group
> over the years from the late 1990s to the present, everything is slowly being
> converted to C++. A number of the SCALE codes are being changed to run on
> massively parallel machines, but there are libraries for both Fortran and C++
> available for such machines. I have my suspicions why they are converting but
> that is irrelevant here.

Well, one reason might be that there are more people interested in
working on the C++ version. That is pretty much independent of the
features and abilities of the languages.

> Is there a reason such as availability of certain libraries or code efficiency that
> you want to convert all your F77 code to C++?
Some of the C++ libraries are likely already translation from Fortran.

> The reason I am interested is that I have some old F77 code that ran on IBM
> mainframes, Unix workstations, and DOS PCs which I want to document and
> revive to run on Windows and Linux now that I am retired and have the time.

gfortran can easily run F77 code on any of those systems.

Last year I had IBM's ECAP running on gfortran. That goes back to
Fortran II days, though was translated to Fortran IV pretty far back.,

There were a few complications in doing it, but not much.

I also had Spice 2g6 running, the last of the Fortran Spice versions.

> I had a C/C++ class in the late 1990s but never used any of it at work. I am
> taking some online self study classes in C/C++ so that I can at least read a
> little of existing codes and use it in my project if I find it useful.

If you aren't already into C or C++, not much reason to do it.
Well, maybe as a reason to learn/improve your C++ skills.

Otherwise, you can slowly convert to newer forms as you feel
like it, and keep the old ones running as they are.

Re: converting a 700,000+ line Fortran 77 plus 50,000+ line C++ program to C++, part 1

<tjc6t5$2hrkt$1@dont-email.me>

  copy mid

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

  copy link   Newsgroups: comp.lang.fortran comp.lang.c++
Path: i2pn2.org!i2pn.org!eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail
From: lynnmcguire5@gmail.com (Lynn McGuire)
Newsgroups: comp.lang.fortran,comp.lang.c++
Subject: Re: converting a 700,000+ line Fortran 77 plus 50,000+ line C++
program to C++, part 1
Date: Wed, 26 Oct 2022 15:56:04 -0500
Organization: A noiseless patient Spider
Lines: 110
Message-ID: <tjc6t5$2hrkt$1@dont-email.me>
References: <tj4egb$u68$1@gioia.aioe.org>
<84aed433-6586-41af-b3d0-28dd17f9450bn@googlegroups.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Wed, 26 Oct 2022 20:56:06 -0000 (UTC)
Injection-Info: reader01.eternal-september.org; posting-host="cd062d3e184e8ae4dee0a69f14910882";
logging-data="2682525"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/iMFeDhV4wQNYtr+F8/jyw"
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101
Thunderbird/102.4.0
Cancel-Lock: sha1:YqEkk8xVtQmK6KUm9wBh3kbeN90=
Content-Language: en-US
In-Reply-To: <84aed433-6586-41af-b3d0-28dd17f9450bn@googlegroups.com>
 by: Lynn McGuire - Wed, 26 Oct 2022 20:56 UTC

On 10/26/2022 11:38 AM, Jeff Ryman wrote:
> On Sunday, October 23, 2022 at 3:16:48 PM UTC-7, Lynn McGuire wrote:
>> We are converting a 700,000+ Fortran 77 lines of code plus 50,000+ C++
>> lines of code engineering software product to C++. With all that code,
>> we produce four Win32 EXEs and three Win32 DLLs. My goal is to add four
>> Win64 EXEs and three Win64 DLLs to the product with the same
>> capabilities as the Win32 versions (console, windowed, Excel callable,
>> Excel embeddable). Plus support for Unicode named files and Unicode
>> file paths.
>>
>> I am using a customized version of f2c at the moment to automate 60% to
>> 80% of the conversion from F77 to C++. I have added support for
>> logical*8, changed the output file from *.c to *.cpp, added an include
>> for the Fable fem.hpp template library, removed the trailing underscores
>> from the subroutine and common block names, removed the ftnlen arguments
>> from the character arguments, converted all F77 comments to the //
>> instead of the /* */, and a few other items. If desired, I am willing
>> to post a copy of my modified f2c on my website with the source code.
>> https://netlib.org/f2c/
>> https://en.wikipedia.org/wiki/F2c
>>
>> f2c does not get me totally there. The Fortran character strings were
>> poorly handled so they will probably needed fixing for proper sizing and
>> alignment. The i/o code is crap so I take the original F77 i/o code and
>> translate it by hand. The arrays in the argument list are still based
>> at an index of one so I convert those to base index of zero by hand.
>> All of the local and common block arrays were converted to a base index
>> of zero by f2c. I add the new *.cpp file to my Visual Studio project.
>> I then add the new function prototypes to my prototypes.h file and I add
>> any new common block structures to my commons.h file. I then compile
>> and fix until I get a clean compile.
>>
>> I have converted over 8,000 lines of F77 code to C++ now. Several dozen
>> subroutines and several dozen common blocks. Most are compiling cleanly
>> in Visual C++ 2015. My limited testing is working well and I will
>> expand my testing when I hit 15,000 or 20,000 lines of F77 code
>> converted. I hoping to get a complete build of the smaller of the Win32
>> DLLs by the end of the year and a full build by next June. One of my
>> programmers thinks that we will be lucky to get a complete build by late
>> 2024.
>>
>> Lynn
>
> I'm not trying to be a smart ass or a troll and I'm not trying to change your mind.
> I'm wondering why you want to convert all of the F77 to C++ rather than to
> modern Fortran that can call or be called from the existing C++ routines.
>
> As a side note, I used to work for a group at Oak Ridge National Laboratory
> (ORNL) that developed the SCALE code system that is used for nuclear analysis.
> A lot of effort was spent many years ago converting it from F77 to Fortran 9x.
> Now, after addition of a number of computer science trained staff to that group
> over the years from the late 1990s to the present, everything is slowly being
> converted to C++. A number of the SCALE codes are being changed to run on
> massively parallel machines, but there are libraries for both Fortran and C++
> available for such machines. I have my suspicions why they are converting but
> that is irrelevant here.
>
> Is there a reason such as availability of certain libraries or code efficiency that
> you want to convert all your F77 code to C++?
>
> The reason I am interested is that I have some old F77 code that ran on IBM
> mainframes, Unix workstations, and DOS PCs which I want to document and
> revive to run on Windows and Linux now that I am retired and have the time.
>
> I had a C/C++ class in the late 1990s but never used any of it at work. I am
> taking some online self study classes in C/C++ so that I can at least read a
> little of existing codes and use it in my project if I find it useful.
>
> Thanks for your consideration.
>
> Jeff

We are having trouble maintaining a mixed Fortran and C++ software
product so I have decided to jump all the way to C++. I like using an
IDE (I first used Turbo Pascal in 1983) and feel that they are
incredibly productive for larger software products. The premier IDE on
Windows is Visual Studio which has some support for Intel Fortran but it
is poor at best when mixed with C++.

We used three features in our F66 / F77 code which are turning out to be
problematic in porting to a new Fortran compiler that supports 64 bit
software. The first is the carriage control option in printing to
stdout or a file. This was never a Fortran standard feature but
everyone used it back in the 1960s, 1970s, and 1980s. This killed our
port to gfortran several years ago but it is now supported there
reputedly. We are ripping it out of our formats as a part of our
conversion to C++.

We use zero initialization of all global and local variables. This
killed our first port to Intel Fortran in 2005 ??? when it uncovered a
linker bug / crash. We have removed the need for this from a portion of
our Fortran code but will be a problem in the C++ conversion.

We use Fortran structures, popularized by DEC back in the 1970s and
1980s, but they never became part of the Fortran standard. We are
converting our structure code to integer*8 and logical*8 as a part of
the C++ port.

Almost all of the Fortran compilers are now free. This is a bad sign,
especially since Intel Fortran, the premier Fortran compiler, just
jumped to free. To me, this says that future of Fortran is cloudy at best.

Nothing in this world is perfect but moving to a single programming
language should help us in the long run. Our software is embeddable in
Excel or can embed Excel in itself, all my glue code is in C++ which
really points the direction to me.

Thanks,
Lynn

Re: converting a 700,000+ line Fortran 77 plus 50,000+ line C++ program to C++, part 1

<35aea1e9-10eb-4949-993f-70eaab092237n@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.fortran
X-Received: by 2002:a05:620a:2905:b0:6ee:e598:a973 with SMTP id m5-20020a05620a290500b006eee598a973mr33587292qkp.338.1666832340764;
Wed, 26 Oct 2022 17:59:00 -0700 (PDT)
X-Received: by 2002:ac8:5f47:0:b0:399:aa82:3c6f with SMTP id
y7-20020ac85f47000000b00399aa823c6fmr39464146qta.627.1666832340634; Wed, 26
Oct 2022 17:59:00 -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: Wed, 26 Oct 2022 17:59:00 -0700 (PDT)
In-Reply-To: <tjc6t5$2hrkt$1@dont-email.me>
Injection-Info: google-groups.googlegroups.com; posting-host=2601:602:9700:4689:8409:e85a:dbdb:6c95;
posting-account=gLDX1AkAAAA26M5HM-O3sVMAXdxK9FPA
NNTP-Posting-Host: 2601:602:9700:4689:8409:e85a:dbdb:6c95
References: <tj4egb$u68$1@gioia.aioe.org> <84aed433-6586-41af-b3d0-28dd17f9450bn@googlegroups.com>
<tjc6t5$2hrkt$1@dont-email.me>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <35aea1e9-10eb-4949-993f-70eaab092237n@googlegroups.com>
Subject: Re: converting a 700,000+ line Fortran 77 plus 50,000+ line C++
program to C++, part 1
From: gah4@u.washington.edu (gah4)
Injection-Date: Thu, 27 Oct 2022 00:59:00 +0000
Content-Type: text/plain; charset="UTF-8"
X-Received-Bytes: 3611
 by: gah4 - Thu, 27 Oct 2022 00:59 UTC

On Wednesday, October 26, 2022 at 1:56:09 PM UTC-7, Lynn McGuire wrote:

(snip)

> We used three features in our F66 / F77 code which are turning out to be
> problematic in porting to a new Fortran compiler that supports 64 bit
> software. The first is the carriage control option in printing to
> stdout or a file. This was never a Fortran standard feature but
> everyone used it back in the 1960s, 1970s, and 1980s.

It is in the Fortran 66 standard with "when formatted records are
prepared for printing". For one, you could argue that not all are
being prepared for printing, at least not in the Fortran 66 sense.

For IBM OS/360 and successors, it is not part of Fortran but of
the OS. If the DCB has RECFM=FBA you get them, if FB you don't.

But the is reminding me of a Fortran to C port in about 1987.

The C code had a tendency to write the '\n' at the beginning
of a printf() call, instead of at the end. Sometime later, those
all got fixed, but it was related to the way that Fortran I/O
always starts on a new line, and C doesn't do that.

> This killed our
> port to gfortran several years ago but it is now supported there
> reputedly. We are ripping it out of our formats as a part of our
> conversion to C++.

Well, the C/Unix tradition was to write '\f' (form feed characters)
to the file. I always thought that seemed less standardized
than ASA characters. Also, there is a Unix program to convert
from ASA characters.

In any case, yes, I always found ASA control characters funny
when using interactive terminals for output devices. They are
fine for line printers, though.

(snip)
> Almost all of the Fortran compilers are now free. This is a bad sign,
> especially since Intel Fortran, the premier Fortran compiler, just
> jumped to free. To me, this says that future of Fortran is cloudy at best.

Seems to me like web browsers are now always free. Pay ones can't
compete with free ones.

> Nothing in this world is perfect but moving to a single programming
> language should help us in the long run. Our software is embeddable in
> Excel or can embed Excel in itself, all my glue code is in C++ which
> really points the direction to me.

I think if I was in the mood for doing it, it would be Java and not C++,
but then that is just me.

Re: converting a 700,000+ line Fortran 77 plus 50,000+ line C++ program to C++, part 1

<tjd2gj$k1i$1@gioia.aioe.org>

  copy mid

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

  copy link   Newsgroups: comp.lang.fortran comp.lang.c++
Path: i2pn2.org!i2pn.org!aioe.org!mdf2aNOb2oCHynmZpuX5uw.user.46.165.242.91.POSTED!not-for-mail
From: lynnmcguire5@gmail.com (Lynn McGuire)
Newsgroups: comp.lang.fortran,comp.lang.c++
Subject: Re: converting a 700,000+ line Fortran 77 plus 50,000+ line C++
program to C++, part 1
Date: Wed, 26 Oct 2022 23:47:14 -0500
Organization: Aioe.org NNTP Server
Message-ID: <tjd2gj$k1i$1@gioia.aioe.org>
References: <tj4egb$u68$1@gioia.aioe.org>
<84aed433-6586-41af-b3d0-28dd17f9450bn@googlegroups.com>
<tjc6t5$2hrkt$1@dont-email.me>
<35aea1e9-10eb-4949-993f-70eaab092237n@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="20530"; posting-host="mdf2aNOb2oCHynmZpuX5uw.user.gioia.aioe.org"; mail-complaints-to="abuse@aioe.org";
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101
Thunderbird/102.4.0
X-Notice: Filtered by postfilter v. 0.9.2
Content-Language: en-US
 by: Lynn McGuire - Thu, 27 Oct 2022 04:47 UTC

On 10/26/2022 7:59 PM, gah4 wrote:
> On Wednesday, October 26, 2022 at 1:56:09 PM UTC-7, Lynn McGuire wrote:
>
> (snip)
>
>> We used three features in our F66 / F77 code which are turning out to be
>> problematic in porting to a new Fortran compiler that supports 64 bit
>> software. The first is the carriage control option in printing to
>> stdout or a file. This was never a Fortran standard feature but
>> everyone used it back in the 1960s, 1970s, and 1980s.
>
> It is in the Fortran 66 standard with "when formatted records are
> prepared for printing". For one, you could argue that not all are
> being prepared for printing, at least not in the Fortran 66 sense.
>
> For IBM OS/360 and successors, it is not part of Fortran but of
> the OS. If the DCB has RECFM=FBA you get them, if FB you don't.
>
> But the is reminding me of a Fortran to C port in about 1987.
>
> The C code had a tendency to write the '\n' at the beginning
> of a printf() call, instead of at the end. Sometime later, those
> all got fixed, but it was related to the way that Fortran I/O
> always starts on a new line, and C doesn't do that.
>
>> This killed our
>> port to gfortran several years ago but it is now supported there
>> reputedly. We are ripping it out of our formats as a part of our
>> conversion to C++.
>
> Well, the C/Unix tradition was to write '\f' (form feed characters)
> to the file. I always thought that seemed less standardized
> than ASA characters. Also, there is a Unix program to convert
> from ASA characters.
>
> In any case, yes, I always found ASA control characters funny
> when using interactive terminals for output devices. They are
> fine for line printers, though.
>
> (snip)
>> Almost all of the Fortran compilers are now free. This is a bad sign,
>> especially since Intel Fortran, the premier Fortran compiler, just
>> jumped to free. To me, this says that future of Fortran is cloudy at best.
>
> Seems to me like web browsers are now always free. Pay ones can't
> compete with free ones.
>
>> Nothing in this world is perfect but moving to a single programming
>> language should help us in the long run. Our software is embeddable in
>> Excel or can embed Excel in itself, all my glue code is in C++ which
>> really points the direction to me.
>
> I think if I was in the mood for doing it, it would be Java and not C++,
> but then that is just me.

Would you really write a 750,000 line calculation engine in Java ?

Lynn

Re: converting a 700,000+ line Fortran 77 plus 50,000+ line C++ program to C++, part 1

<tjd4qp$2mqfe$1@dont-email.me>

  copy mid

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

  copy link   Newsgroups: comp.lang.fortran comp.lang.c comp.lang.c++
Path: i2pn2.org!i2pn.org!eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail
From: chris.m.thomasson.1@gmail.com (Chris M. Thomasson)
Newsgroups: comp.lang.fortran,comp.lang.c,comp.lang.c++
Subject: Re: converting a 700,000+ line Fortran 77 plus 50,000+ line C++
program to C++, part 1
Date: Wed, 26 Oct 2022 22:26:47 -0700
Organization: A noiseless patient Spider
Lines: 42
Message-ID: <tjd4qp$2mqfe$1@dont-email.me>
References: <tj4egb$u68$1@gioia.aioe.org>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Thu, 27 Oct 2022 05:26:49 -0000 (UTC)
Injection-Info: reader01.eternal-september.org; posting-host="e016beef12186cb3c9667a2992471105";
logging-data="2845166"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19E1ITNvpmMY/87o7FdEf3p9ELGoHuK23g="
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101
Thunderbird/102.4.0
Cancel-Lock: sha1:QFwf+GEXueOjr3zSXL7U0R3Tbfw=
In-Reply-To: <tj4egb$u68$1@gioia.aioe.org>
Content-Language: en-US
 by: Chris M. Thomasson - Thu, 27 Oct 2022 05:26 UTC

On 10/23/2022 3:16 PM, Lynn McGuire wrote:
> We are converting a 700,000+ Fortran 77 lines of code plus 50,000+ C++
> lines of code engineering software product to C++.  With all that code,
> we produce four Win32 EXEs and three Win32 DLLs.  My goal is to add four
> Win64 EXEs and three Win64 DLLs to the product with the same
> capabilities as the Win32 versions (console, windowed, Excel callable,
> Excel embeddable).  Plus support for Unicode named files and Unicode
> file paths.
>
> I am using a customized version of f2c at the moment to automate 60% to
> 80% of the conversion from F77 to C++.  I have added support for
> logical*8, changed the output file from *.c to *.cpp, added an include
> for the Fable fem.hpp template library, removed the trailing underscores
> from the subroutine and common block names, removed the ftnlen arguments
> from the character arguments, converted all F77 comments to the //
> instead of the /* */, and a few other items.  If desired, I am willing
> to post a copy of my modified f2c on my website with the source code.
>    https://netlib.org/f2c/
>    https://en.wikipedia.org/wiki/F2c
>
> f2c does not get me totally there.  The Fortran character strings were
> poorly handled so they will probably needed fixing for proper sizing and
> alignment.  The i/o code is crap so I take the original F77 i/o code and
> translate it by hand.  The arrays in the argument list are still based
> at an index of one so I convert those to base index of zero by hand. All
> of the local and common block arrays were converted to a base index of
> zero by f2c.  I add the new *.cpp file to my Visual Studio project. I
> then add the new function prototypes to my prototypes.h file and I add
> any new common block structures to my commons.h file.  I then compile
> and fix until I get a clean compile.
>
> I have converted over 8,000 lines of F77 code to C++ now.  Several dozen
> subroutines and several dozen common blocks.  Most are compiling cleanly
> in Visual C++ 2015.  My limited testing is working well and I will
> expand my testing when I hit 15,000 or 20,000 lines of F77 code
> converted.  I hoping to get a complete build of the smaller of the Win32
> DLLs by the end of the year and a full build by next June.  One of my
> programmers thinks that we will be lucky to get a complete build by late
> 2024.

Is the code modular so you can port and test just a part of it?

Re: converting a 700,000+ line Fortran 77 plus 50,000+ line C++ program to C++, part 1

<aa649b29-5837-486b-9869-834f1d289cfbn@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.fortran
X-Received: by 2002:ae9:eb52:0:b0:6f9:fe9e:8908 with SMTP id b79-20020ae9eb52000000b006f9fe9e8908mr166793qkg.18.1666857187335;
Thu, 27 Oct 2022 00:53:07 -0700 (PDT)
X-Received: by 2002:a05:622a:15cf:b0:39c:4c04:107d with SMTP id
d15-20020a05622a15cf00b0039c4c04107dmr39343869qty.122.1666857187073; Thu, 27
Oct 2022 00:53:07 -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, 27 Oct 2022 00:53:06 -0700 (PDT)
In-Reply-To: <35aea1e9-10eb-4949-993f-70eaab092237n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=49.185.64.33; posting-account=S_MdrwoAAAD7T2pxG2e393dk6y0tc0Le
NNTP-Posting-Host: 49.185.64.33
References: <tj4egb$u68$1@gioia.aioe.org> <84aed433-6586-41af-b3d0-28dd17f9450bn@googlegroups.com>
<tjc6t5$2hrkt$1@dont-email.me> <35aea1e9-10eb-4949-993f-70eaab092237n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <aa649b29-5837-486b-9869-834f1d289cfbn@googlegroups.com>
Subject: Re: converting a 700,000+ line Fortran 77 plus 50,000+ line C++
program to C++, part 1
From: robin.vowels@gmail.com (Robin Vowels)
Injection-Date: Thu, 27 Oct 2022 07:53:07 +0000
Content-Type: text/plain; charset="UTF-8"
X-Received-Bytes: 3975
 by: Robin Vowels - Thu, 27 Oct 2022 07:53 UTC

On Thursday, October 27, 2022 at 11:59:02 AM UTC+11, gah4 wrote:
> On Wednesday, October 26, 2022 at 1:56:09 PM UTC-7, Lynn McGuire wrote:
>
> (snip)
> > We used three features in our F66 / F77 code which are turning out to be
> > problematic in porting to a new Fortran compiler that supports 64 bit
> > software. The first is the carriage control option in printing to
> > stdout or a file. This was never a Fortran standard feature but
> > everyone used it back in the 1960s, 1970s, and 1980s.
..
That was never anything of significance in any version of Fortran.
..
> It is in the Fortran 66 standard with "when formatted records are
> prepared for printing". For one, you could argue that not all are
> being prepared for printing, at least not in the Fortran 66 sense.
>
> For IBM OS/360 and successors, it is not part of Fortran but of
> the OS. If the DCB has RECFM=FBA you get them, if FB you don't.
>
> But the is reminding me of a Fortran to C port in about 1987.
>
> The C code had a tendency to write the '\n' at the beginning
> of a printf() call, instead of at the end. Sometime later, those
> all got fixed, but it was related to the way that Fortran I/O
> always starts on a new line, and C doesn't do that.
..
That was true for FORTRAN 77, but it is not true from Fortran 90.
..
> > This killed our
> > port to gfortran several years ago
..
There was nothing in that that would have been cause for "killing"
a port to gfortran.
..
> but it is now supported there
> > reputedly. We are ripping it out of our formats as a part of our
> > conversion to C++.
..
> Well, the C/Unix tradition was to write '\f' (form feed characters)
> to the file. I always thought that seemed less standardized
> than ASA characters. Also, there is a Unix program to convert
> from ASA characters.
>
> In any case, yes, I always found ASA control characters funny
> when using interactive terminals for output devices. They are
> fine for line printers, though.
>
> > Almost all of the Fortran compilers are now free. This is a bad sign,
> > especially since Intel Fortran, the premier Fortran compiler, just
> > jumped to free. To me, this says that future of Fortran is cloudy at best.
..
An inappropriate conclusion.
..
> Seems to me like web browsers are now always free. Pay ones can't
> compete with free ones.
..
> > Nothing in this world is perfect but moving to a single programming
> > language should help us in the long run. Our software is embeddable in
> > Excel or can embed Excel in itself, all my glue code is in C++ which
> > really points the direction to me.

Re: converting a 700,000+ line Fortran 77 plus 50,000+ line C++ program to C++, part 1

<25672c56-1322-46ca-a3c9-9e9b02ccf13fn@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.fortran
X-Received: by 2002:a05:620a:271f:b0:6d4:56aa:4385 with SMTP id b31-20020a05620a271f00b006d456aa4385mr33748214qkp.175.1666857384491;
Thu, 27 Oct 2022 00:56:24 -0700 (PDT)
X-Received: by 2002:a05:622a:4cc:b0:39c:bfb1:8a45 with SMTP id
q12-20020a05622a04cc00b0039cbfb18a45mr39704868qtx.647.1666857384289; Thu, 27
Oct 2022 00:56:24 -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, 27 Oct 2022 00:56:24 -0700 (PDT)
In-Reply-To: <tjd2gj$k1i$1@gioia.aioe.org>
Injection-Info: google-groups.googlegroups.com; posting-host=49.185.64.33; posting-account=S_MdrwoAAAD7T2pxG2e393dk6y0tc0Le
NNTP-Posting-Host: 49.185.64.33
References: <tj4egb$u68$1@gioia.aioe.org> <84aed433-6586-41af-b3d0-28dd17f9450bn@googlegroups.com>
<tjc6t5$2hrkt$1@dont-email.me> <35aea1e9-10eb-4949-993f-70eaab092237n@googlegroups.com>
<tjd2gj$k1i$1@gioia.aioe.org>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <25672c56-1322-46ca-a3c9-9e9b02ccf13fn@googlegroups.com>
Subject: Re: converting a 700,000+ line Fortran 77 plus 50,000+ line C++
program to C++, part 1
From: robin.vowels@gmail.com (Robin Vowels)
Injection-Date: Thu, 27 Oct 2022 07:56:24 +0000
Content-Type: text/plain; charset="UTF-8"
X-Received-Bytes: 1747
 by: Robin Vowels - Thu, 27 Oct 2022 07:56 UTC

On Thursday, October 27, 2022 at 3:47:19 PM UTC+11, Lynn McGuire wrote:
> On 10/26/2022 7:59 PM, gah4 wrote:
..
> > I think if I was in the mood for doing it, it would be Java and not C++,
> > but then that is just me.
..
> Would you really write a 750,000 line calculation engine in Java ?
..
I think the question that you should be asking yourself is
"would you really write a 750,000 line calculation engine in C++ ?"

Re: converting a 700,000+ line Fortran 77 plus 50,000+ line C++ program to C++, part 1

<da996b92-2a35-483c-8368-176832929c8fn@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.fortran
X-Received: by 2002:ac8:5902:0:b0:39c:e440:6adb with SMTP id 2-20020ac85902000000b0039ce4406adbmr40024241qty.18.1666860687760;
Thu, 27 Oct 2022 01:51:27 -0700 (PDT)
X-Received: by 2002:a05:6214:1c4a:b0:4bb:64a3:727a with SMTP id
if10-20020a0562141c4a00b004bb64a3727amr20349666qvb.16.1666860687604; Thu, 27
Oct 2022 01:51:27 -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, 27 Oct 2022 01:51:27 -0700 (PDT)
In-Reply-To: <tj4egb$u68$1@gioia.aioe.org>
Injection-Info: google-groups.googlegroups.com; posting-host=2601:602:9700:4689:d0d7:9ef8:9f3d:16ce;
posting-account=gLDX1AkAAAA26M5HM-O3sVMAXdxK9FPA
NNTP-Posting-Host: 2601:602:9700:4689:d0d7:9ef8:9f3d:16ce
References: <tj4egb$u68$1@gioia.aioe.org>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <da996b92-2a35-483c-8368-176832929c8fn@googlegroups.com>
Subject: Re: converting a 700,000+ line Fortran 77 plus 50,000+ line C++
program to C++, part 1
From: gah4@u.washington.edu (gah4)
Injection-Date: Thu, 27 Oct 2022 08:51:27 +0000
Content-Type: text/plain; charset="UTF-8"
X-Received-Bytes: 1818
 by: gah4 - Thu, 27 Oct 2022 08:51 UTC

On Sunday, October 23, 2022 at 3:16:48 PM UTC-7, Lynn McGuire wrote:
> We are converting a 700,000+ Fortran 77 lines of code plus 50,000+ C++
> lines of code engineering software product to C++.

As some other comments make me wonder, is this really C++,
or is it more like C.

That is, how many C++ features that are not in C are used.

Many C++ programs do a lot of allocate/deallocate for a very
short term. That is one reason people complain about the speed
of C++ code. Not that it is necessary to do that, but some do.

Now, since Fortran 77 doesn't do that, I suspect that your program
doesn't, but just to be sure.

Re: converting a 700,000+ line Fortran 77 plus 50,000+ line C++ program to C++, part 1

<TYw6L.80940$R_o7.34451@fx33.iad>

  copy mid

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

  copy link   Newsgroups: comp.lang.fortran comp.lang.c++
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!feed1.usenet.blueworldhosting.com!peer03.iad!feed-me.highwinds-media.com!news.highwinds-media.com!fx33.iad.POSTED!not-for-mail
X-newsreader: xrn 9.03-beta-14-64bit
Sender: scott@dragon.sl.home (Scott Lurndal)
From: scott@slp53.sl.home (Scott Lurndal)
Reply-To: slp53@pacbell.net
Subject: Re: converting a 700,000+ line Fortran 77 plus 50,000+ line C++ program to C++, part 1
Newsgroups: comp.lang.fortran,comp.lang.c++
References: <tj4egb$u68$1@gioia.aioe.org> <84aed433-6586-41af-b3d0-28dd17f9450bn@googlegroups.com> <tjc6t5$2hrkt$1@dont-email.me> <35aea1e9-10eb-4949-993f-70eaab092237n@googlegroups.com> <tjd2gj$k1i$1@gioia.aioe.org>
Lines: 64
Message-ID: <TYw6L.80940$R_o7.34451@fx33.iad>
X-Complaints-To: abuse@usenetserver.com
NNTP-Posting-Date: Thu, 27 Oct 2022 14:54:43 UTC
Organization: UsenetServer - www.usenetserver.com
Date: Thu, 27 Oct 2022 14:54:43 GMT
X-Received-Bytes: 3626
 by: Scott Lurndal - Thu, 27 Oct 2022 14:54 UTC

Lynn McGuire <lynnmcguire5@gmail.com> writes:
>On 10/26/2022 7:59 PM, gah4 wrote:
>> On Wednesday, October 26, 2022 at 1:56:09 PM UTC-7, Lynn McGuire wrote:
>>
>> (snip)
>>
>>> We used three features in our F66 / F77 code which are turning out to be
>>> problematic in porting to a new Fortran compiler that supports 64 bit
>>> software. The first is the carriage control option in printing to
>>> stdout or a file. This was never a Fortran standard feature but
>>> everyone used it back in the 1960s, 1970s, and 1980s.
>>
>> It is in the Fortran 66 standard with "when formatted records are
>> prepared for printing". For one, you could argue that not all are
>> being prepared for printing, at least not in the Fortran 66 sense.
>>
>> For IBM OS/360 and successors, it is not part of Fortran but of
>> the OS. If the DCB has RECFM=FBA you get them, if FB you don't.
>>
>> But the is reminding me of a Fortran to C port in about 1987.
>>
>> The C code had a tendency to write the '\n' at the beginning
>> of a printf() call, instead of at the end. Sometime later, those
>> all got fixed, but it was related to the way that Fortran I/O
>> always starts on a new line, and C doesn't do that.
>>
>>> This killed our
>>> port to gfortran several years ago but it is now supported there
>>> reputedly. We are ripping it out of our formats as a part of our
>>> conversion to C++.
>>
>> Well, the C/Unix tradition was to write '\f' (form feed characters)
>> to the file. I always thought that seemed less standardized
>> than ASA characters. Also, there is a Unix program to convert
>> from ASA characters.
>>
>> In any case, yes, I always found ASA control characters funny
>> when using interactive terminals for output devices. They are
>> fine for line printers, though.
>>
>> (snip)
>>> Almost all of the Fortran compilers are now free. This is a bad sign,
>>> especially since Intel Fortran, the premier Fortran compiler, just
>>> jumped to free. To me, this says that future of Fortran is cloudy at best.
>>
>> Seems to me like web browsers are now always free. Pay ones can't
>> compete with free ones.
>>
>>> Nothing in this world is perfect but moving to a single programming
>>> language should help us in the long run. Our software is embeddable in
>>> Excel or can embed Excel in itself, all my glue code is in C++ which
>>> really points the direction to me.
>>
>> I think if I was in the mood for doing it, it would be Java and not C++,
>> but then that is just me.
>
>Would you really write a 750,000 line calculation engine in Java ?
>

I wouldn't have written a 750,000 line engine in any language;
not as a single module anyway.

You can probably do the whole thing in something like MatLab
in a couple hundred lines :-)

Re: converting a 700,000+ line Fortran 77 plus 50,000+ line C++ program to C++, part 1

<tjei6d$2bmjq$1@newsreader4.netcologne.de>

  copy mid

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

  copy link   Newsgroups: comp.lang.fortran comp.lang.c++
Followup: comp.lang.fortran
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!newsreader4.netcologne.de!news.netcologne.de!.POSTED.2001-4dd7-6464-0-7285-c2ff-fe6c-992d.ipv6dyn.netcologne.de!not-for-mail
From: tkoenig@netcologne.de (Thomas Koenig)
Newsgroups: comp.lang.fortran,comp.lang.c++
Subject: Re: converting a 700,000+ line Fortran 77 plus 50,000+ line C++
program to C++, part 1
Followup-To: comp.lang.fortran
Date: Thu, 27 Oct 2022 18:21:01 -0000 (UTC)
Organization: news.netcologne.de
Distribution: world
Message-ID: <tjei6d$2bmjq$1@newsreader4.netcologne.de>
References: <tj4egb$u68$1@gioia.aioe.org>
<84aed433-6586-41af-b3d0-28dd17f9450bn@googlegroups.com>
<tjc6t5$2hrkt$1@dont-email.me>
Injection-Date: Thu, 27 Oct 2022 18:21:01 -0000 (UTC)
Injection-Info: newsreader4.netcologne.de; posting-host="2001-4dd7-6464-0-7285-c2ff-fe6c-992d.ipv6dyn.netcologne.de:2001:4dd7:6464:0:7285:c2ff:fe6c:992d";
logging-data="2480762"; mail-complaints-to="abuse@netcologne.de"
User-Agent: slrn/1.0.3 (Linux)
 by: Thomas Koenig - Thu, 27 Oct 2022 18:21 UTC

Lynn McGuire <lynnmcguire5@gmail.com> schrieb:

> We used three features in our F66 / F77 code which are turning out to be
> problematic in porting to a new Fortran compiler that supports 64 bit
> software. The first is the carriage control option in printing to
> stdout or a file. This was never a Fortran standard feature but
> everyone used it back in the 1960s, 1970s, and 1980s. This killed our
> port to gfortran several years ago but it is now supported there
> reputedly.

I am not sure how compiler support of ASA carriage control
by a compiler is supposed to look like (apart from the
mandated leading space in free-form output).

The traditional UNIX way is to pipe it through asa(1), which
emulates the traditional carriage control with overstrike
characters etc. This is reasonably easy to write, I once
wrote such a utility myself (and lost the source) but Debian
has it. Source at https://sources.debian.org/src/asa/1.2-1.1/ .

> We are ripping it out of our formats as a part of our
> conversion to C++.

Good riddance.

> We use zero initialization of all global and local variables. This
> killed our first port to Intel Fortran in 2005 ??? when it uncovered a
> linker bug / crash. We have removed the need for this from a portion of
> our Fortran code but will be a problem in the C++ conversion.

That is a bigger problem.

Not sure if your code runs under Linux. If it does, you might want
to run it under valgrind, which will generate tons of errors if
undefined variables are used.

> We use Fortran structures, popularized by DEC back in the 1970s and
> 1980s, but they never became part of the Fortran standard. We are
> converting our structure code to integer*8 and logical*8 as a part of
> the C++ port.

Huh?

> Almost all of the Fortran compilers are now free. This is a bad sign,
> especially since Intel Fortran, the premier Fortran compiler, just
> jumped to free. To me, this says that future of Fortran is cloudy at best.

Why should this be a bad thing? Intel uses the compiler to sell chips,
and so does IBM for POWER.

> Nothing in this world is perfect but moving to a single programming
> language should help us in the long run. Our software is embeddable in
> Excel or can embed Excel in itself, all my glue code is in C++ which
> really points the direction to me.

In the immortal words of a J3 member...

" Hiring someone else to write your C++ code is probably a good
idea for preserving sanity. Although having to read the code
later will undo any of the previously mentioned benefits."

Re: converting a 700,000+ line Fortran 77 plus 50,000+ line C++ program to C++, part 1

<tjekgl$2r0km$1@dont-email.me>

  copy mid

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

  copy link   Newsgroups: comp.lang.fortran
Path: i2pn2.org!i2pn.org!eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail
From: lynnmcguire5@gmail.com (Lynn McGuire)
Newsgroups: comp.lang.fortran
Subject: Re: converting a 700,000+ line Fortran 77 plus 50,000+ line C++
program to C++, part 1
Date: Thu, 27 Oct 2022 14:00:35 -0500
Organization: A noiseless patient Spider
Lines: 71
Message-ID: <tjekgl$2r0km$1@dont-email.me>
References: <tj4egb$u68$1@gioia.aioe.org>
<84aed433-6586-41af-b3d0-28dd17f9450bn@googlegroups.com>
<tjc6t5$2hrkt$1@dont-email.me> <tjei6d$2bmjq$1@newsreader4.netcologne.de>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Thu, 27 Oct 2022 19:00:37 -0000 (UTC)
Injection-Info: reader01.eternal-september.org; posting-host="0e16e6e3990396a708caf3fd4309d43e";
logging-data="2982550"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19kgfJuF8WDCOrFzHjy9EB+"
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101
Thunderbird/102.4.0
Cancel-Lock: sha1:ePbJM0ctIn5iNMa1GVtfaFYeUMU=
Content-Language: en-US
In-Reply-To: <tjei6d$2bmjq$1@newsreader4.netcologne.de>
 by: Lynn McGuire - Thu, 27 Oct 2022 19:00 UTC

On 10/27/2022 1:21 PM, Thomas Koenig wrote:
> Lynn McGuire <lynnmcguire5@gmail.com> schrieb:
>
>> We used three features in our F66 / F77 code which are turning out to be
>> problematic in porting to a new Fortran compiler that supports 64 bit
>> software. The first is the carriage control option in printing to
>> stdout or a file. This was never a Fortran standard feature but
>> everyone used it back in the 1960s, 1970s, and 1980s. This killed our
>> port to gfortran several years ago but it is now supported there
>> reputedly.
>
> I am not sure how compiler support of ASA carriage control
> by a compiler is supposed to look like (apart from the
> mandated leading space in free-form output).
>
> The traditional UNIX way is to pipe it through asa(1), which
> emulates the traditional carriage control with overstrike
> characters etc. This is reasonably easy to write, I once
> wrote such a utility myself (and lost the source) but Debian
> has it. Source at https://sources.debian.org/src/asa/1.2-1.1/ .
>
>> We are ripping it out of our formats as a part of our
>> conversion to C++.
>
> Good riddance.
>
>> We use zero initialization of all global and local variables. This
>> killed our first port to Intel Fortran in 2005 ??? when it uncovered a
>> linker bug / crash. We have removed the need for this from a portion of
>> our Fortran code but will be a problem in the C++ conversion.
>
> That is a bigger problem.
>
> Not sure if your code runs under Linux. If it does, you might want
> to run it under valgrind, which will generate tons of errors if
> undefined variables are used.
>
>> We use Fortran structures, popularized by DEC back in the 1970s and
>> 1980s, but they never became part of the Fortran standard. We are
>> converting our structure code to integer*8 and logical*8 as a part of
>> the C++ port.
>
> Huh?
>
>> Almost all of the Fortran compilers are now free. This is a bad sign,
>> especially since Intel Fortran, the premier Fortran compiler, just
>> jumped to free. To me, this says that future of Fortran is cloudy at best.
>
> Why should this be a bad thing? Intel uses the compiler to sell chips,
> and so does IBM for POWER.
>
>> Nothing in this world is perfect but moving to a single programming
>> language should help us in the long run. Our software is embeddable in
>> Excel or can embed Excel in itself, all my glue code is in C++ which
>> really points the direction to me.
>
> In the immortal words of a J3 member...
>
> " Hiring someone else to write your C++ code is probably a good
> idea for preserving sanity. Although having to read the code
> later will undo any of the previously mentioned benefits."

Yeah, I ripped out the overstrike characters years ago. But when one
has over 10,000 format statements, removing the carriage control
character is a lot of work.

My code ran fine using the old F77 compiler on Unix. So it should run
fine if that compiler is available.

Thanks,
Lynn

Re: converting a 700,000+ line Fortran 77 plus 50,000+ line C++ program to C++, part 1

<tjekiq$2r0km$2@dont-email.me>

  copy mid

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

  copy link   Newsgroups: comp.lang.fortran comp.lang.c comp.lang.c++
Path: i2pn2.org!i2pn.org!aioe.org!eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail
From: lynnmcguire5@gmail.com (Lynn McGuire)
Newsgroups: comp.lang.fortran,comp.lang.c,comp.lang.c++
Subject: Re: converting a 700,000+ line Fortran 77 plus 50,000+ line C++
program to C++, part 1
Date: Thu, 27 Oct 2022 14:01:44 -0500
Organization: A noiseless patient Spider
Lines: 50
Message-ID: <tjekiq$2r0km$2@dont-email.me>
References: <tj4egb$u68$1@gioia.aioe.org> <tjd4qp$2mqfe$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Thu, 27 Oct 2022 19:01:46 -0000 (UTC)
Injection-Info: reader01.eternal-september.org; posting-host="0e16e6e3990396a708caf3fd4309d43e";
logging-data="2982550"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/MGA23st8YF4LMReS3mjDF"
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101
Thunderbird/102.4.0
Cancel-Lock: sha1:IAhGSu9Wh4R29U81hMlOGLqJzEk=
Content-Language: en-US
In-Reply-To: <tjd4qp$2mqfe$1@dont-email.me>
 by: Lynn McGuire - Thu, 27 Oct 2022 19:01 UTC

On 10/27/2022 12:26 AM, Chris M. Thomasson wrote:
> On 10/23/2022 3:16 PM, Lynn McGuire wrote:
>> We are converting a 700,000+ Fortran 77 lines of code plus 50,000+ C++
>> lines of code engineering software product to C++.  With all that
>> code, we produce four Win32 EXEs and three Win32 DLLs.  My goal is to
>> add four Win64 EXEs and three Win64 DLLs to the product with the same
>> capabilities as the Win32 versions (console, windowed, Excel callable,
>> Excel embeddable).  Plus support for Unicode named files and Unicode
>> file paths.
>>
>> I am using a customized version of f2c at the moment to automate 60%
>> to 80% of the conversion from F77 to C++.  I have added support for
>> logical*8, changed the output file from *.c to *.cpp, added an include
>> for the Fable fem.hpp template library, removed the trailing
>> underscores from the subroutine and common block names, removed the
>> ftnlen arguments from the character arguments, converted all F77
>> comments to the // instead of the /* */, and a few other items.  If
>> desired, I am willing to post a copy of my modified f2c on my website
>> with the source code.
>>     https://netlib.org/f2c/
>>     https://en.wikipedia.org/wiki/F2c
>>
>> f2c does not get me totally there.  The Fortran character strings were
>> poorly handled so they will probably needed fixing for proper sizing
>> and alignment.  The i/o code is crap so I take the original F77 i/o
>> code and translate it by hand.  The arrays in the argument list are
>> still based at an index of one so I convert those to base index of
>> zero by hand. All of the local and common block arrays were converted
>> to a base index of zero by f2c.  I add the new *.cpp file to my Visual
>> Studio project. I then add the new function prototypes to my
>> prototypes.h file and I add any new common block structures to my
>> commons.h file.  I then compile and fix until I get a clean compile.
>>
>> I have converted over 8,000 lines of F77 code to C++ now.  Several
>> dozen subroutines and several dozen common blocks.  Most are compiling
>> cleanly in Visual C++ 2015.  My limited testing is working well and I
>> will expand my testing when I hit 15,000 or 20,000 lines of F77 code
>> converted.  I hoping to get a complete build of the smaller of the
>> Win32 DLLs by the end of the year and a full build by next June.  One
>> of my programmers thinks that we will be lucky to get a complete build
>> by late 2024.
>
> Is the code modular so you can port and test just a part of it?

Somewhat. And yes, that is what I am doing. Port for a while and then
test. Port for a while and then test. I have already completed the
first cycle. No showstoppers.

Lynn

Re: converting a 700,000+ line Fortran 77 plus 50,000+ line C++ program to C++, part 1

<tjekso$2r0km$3@dont-email.me>

  copy mid

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

  copy link   Newsgroups: comp.lang.fortran comp.lang.c++
Path: i2pn2.org!i2pn.org!aioe.org!eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail
From: lynnmcguire5@gmail.com (Lynn McGuire)
Newsgroups: comp.lang.fortran,comp.lang.c++
Subject: Re: converting a 700,000+ line Fortran 77 plus 50,000+ line C++
program to C++, part 1
Date: Thu, 27 Oct 2022 14:07:02 -0500
Organization: A noiseless patient Spider
Lines: 32
Message-ID: <tjekso$2r0km$3@dont-email.me>
References: <tj4egb$u68$1@gioia.aioe.org>
<da996b92-2a35-483c-8368-176832929c8fn@googlegroups.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Thu, 27 Oct 2022 19:07:04 -0000 (UTC)
Injection-Info: reader01.eternal-september.org; posting-host="0e16e6e3990396a708caf3fd4309d43e";
logging-data="2982550"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/mAGMZSgkAcTq0Wlmv531d"
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101
Thunderbird/102.4.0
Cancel-Lock: sha1:EYgm0++fyV8nVIr4LFaesnnXC9s=
Content-Language: en-US
In-Reply-To: <da996b92-2a35-483c-8368-176832929c8fn@googlegroups.com>
 by: Lynn McGuire - Thu, 27 Oct 2022 19:07 UTC

On 10/27/2022 3:51 AM, gah4 wrote:
> On Sunday, October 23, 2022 at 3:16:48 PM UTC-7, Lynn McGuire wrote:
>> We are converting a 700,000+ Fortran 77 lines of code plus 50,000+ C++
>> lines of code engineering software product to C++.
>
> As some other comments make me wonder, is this really C++,
> or is it more like C.
>
> That is, how many C++ features that are not in C are used.
>
> Many C++ programs do a lot of allocate/deallocate for a very
> short term. That is one reason people complain about the speed
> of C++ code. Not that it is necessary to do that, but some do.
>
> Now, since Fortran 77 doesn't do that, I suspect that your program
> doesn't, but just to be sure.

I can write Fortran in any language. <grin>.

The only real features of C++ that I am using is the strong data typing
and the polymorphism. The strong data typing helps a lot even though it
sometimes invokes strong language from the programmer.

When we ported our Windows user interface from Smalltalk to C++ back in
2001, we went from untyped variables to strongly typed. That really
helped with the port. The amount of code increased from 300,000 lines
of Smalltalk to 450,000 lines of C++. And it ran 100 times faster since
the C++ was not interpreted and not garbage collected like the Smalltalk
code.

Thanks,
Lynn

Re: converting a 700,000+ line Fortran 77 plus 50,000+ line C++ program to C++, part 1

<tjel08$2r0km$4@dont-email.me>

  copy mid

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

  copy link   Newsgroups: comp.lang.fortran comp.lang.c++
Path: i2pn2.org!i2pn.org!aioe.org!eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail
From: lynnmcguire5@gmail.com (Lynn McGuire)
Newsgroups: comp.lang.fortran,comp.lang.c++
Subject: Re: converting a 700,000+ line Fortran 77 plus 50,000+ line C++
program to C++, part 1
Date: Thu, 27 Oct 2022 14:08:54 -0500
Organization: A noiseless patient Spider
Lines: 71
Message-ID: <tjel08$2r0km$4@dont-email.me>
References: <tj4egb$u68$1@gioia.aioe.org>
<84aed433-6586-41af-b3d0-28dd17f9450bn@googlegroups.com>
<tjc6t5$2hrkt$1@dont-email.me>
<35aea1e9-10eb-4949-993f-70eaab092237n@googlegroups.com>
<tjd2gj$k1i$1@gioia.aioe.org> <TYw6L.80940$R_o7.34451@fx33.iad>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Thu, 27 Oct 2022 19:08:56 -0000 (UTC)
Injection-Info: reader01.eternal-september.org; posting-host="0e16e6e3990396a708caf3fd4309d43e";
logging-data="2982550"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19spOICU7YKBbsOy8uqp/dr"
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101
Thunderbird/102.4.0
Cancel-Lock: sha1:OtBusHDWHH9/A80CFa3tI7Nklpo=
In-Reply-To: <TYw6L.80940$R_o7.34451@fx33.iad>
Content-Language: en-US
 by: Lynn McGuire - Thu, 27 Oct 2022 19:08 UTC

On 10/27/2022 9:54 AM, Scott Lurndal wrote:
> Lynn McGuire <lynnmcguire5@gmail.com> writes:
>> On 10/26/2022 7:59 PM, gah4 wrote:
>>> On Wednesday, October 26, 2022 at 1:56:09 PM UTC-7, Lynn McGuire wrote:
>>>
>>> (snip)
>>>
>>>> We used three features in our F66 / F77 code which are turning out to be
>>>> problematic in porting to a new Fortran compiler that supports 64 bit
>>>> software. The first is the carriage control option in printing to
>>>> stdout or a file. This was never a Fortran standard feature but
>>>> everyone used it back in the 1960s, 1970s, and 1980s.
>>>
>>> It is in the Fortran 66 standard with "when formatted records are
>>> prepared for printing". For one, you could argue that not all are
>>> being prepared for printing, at least not in the Fortran 66 sense.
>>>
>>> For IBM OS/360 and successors, it is not part of Fortran but of
>>> the OS. If the DCB has RECFM=FBA you get them, if FB you don't.
>>>
>>> But the is reminding me of a Fortran to C port in about 1987.
>>>
>>> The C code had a tendency to write the '\n' at the beginning
>>> of a printf() call, instead of at the end. Sometime later, those
>>> all got fixed, but it was related to the way that Fortran I/O
>>> always starts on a new line, and C doesn't do that.
>>>
>>>> This killed our
>>>> port to gfortran several years ago but it is now supported there
>>>> reputedly. We are ripping it out of our formats as a part of our
>>>> conversion to C++.
>>>
>>> Well, the C/Unix tradition was to write '\f' (form feed characters)
>>> to the file. I always thought that seemed less standardized
>>> than ASA characters. Also, there is a Unix program to convert
>>> from ASA characters.
>>>
>>> In any case, yes, I always found ASA control characters funny
>>> when using interactive terminals for output devices. They are
>>> fine for line printers, though.
>>>
>>> (snip)
>>>> Almost all of the Fortran compilers are now free. This is a bad sign,
>>>> especially since Intel Fortran, the premier Fortran compiler, just
>>>> jumped to free. To me, this says that future of Fortran is cloudy at best.
>>>
>>> Seems to me like web browsers are now always free. Pay ones can't
>>> compete with free ones.
>>>
>>>> Nothing in this world is perfect but moving to a single programming
>>>> language should help us in the long run. Our software is embeddable in
>>>> Excel or can embed Excel in itself, all my glue code is in C++ which
>>>> really points the direction to me.
>>>
>>> I think if I was in the mood for doing it, it would be Java and not C++,
>>> but then that is just me.
>>
>> Would you really write a 750,000 line calculation engine in Java ?
>>
>
> I wouldn't have written a 750,000 line engine in any language;
> not as a single module anyway.
>
> You can probably do the whole thing in something like MatLab
> in a couple hundred lines :-)

I wish. The thermodynamic flash is over 300,000 lines of F77 code and
2,000+ subroutines by itself.

Lynn

Re: converting a 700,000+ line Fortran 77 plus 50,000+ line C++ program to C++, part 1

<72e989b1-93e9-4975-bdc8-6cf46399ab5en@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.fortran
X-Received: by 2002:a05:6214:21a6:b0:4bb:85b4:fd96 with SMTP id t6-20020a05621421a600b004bb85b4fd96mr15519670qvc.28.1666900363856;
Thu, 27 Oct 2022 12:52:43 -0700 (PDT)
X-Received: by 2002:ac8:7f53:0:b0:39c:f1ee:a04d with SMTP id
g19-20020ac87f53000000b0039cf1eea04dmr43155066qtk.552.1666900363713; Thu, 27
Oct 2022 12:52:43 -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, 27 Oct 2022 12:52:43 -0700 (PDT)
In-Reply-To: <tjc6t5$2hrkt$1@dont-email.me>
Injection-Info: google-groups.googlegroups.com; posting-host=2600:4040:512b:7a00:756b:1097:f013:66f1;
posting-account=Ac_J3QkAAABih73tf3Yz4sHazwGUM-hW
NNTP-Posting-Host: 2600:4040:512b:7a00:756b:1097:f013:66f1
References: <tj4egb$u68$1@gioia.aioe.org> <84aed433-6586-41af-b3d0-28dd17f9450bn@googlegroups.com>
<tjc6t5$2hrkt$1@dont-email.me>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <72e989b1-93e9-4975-bdc8-6cf46399ab5en@googlegroups.com>
Subject: Re: converting a 700,000+ line Fortran 77 plus 50,000+ line C++
program to C++, part 1
From: beliavsky@aol.com (Beliavsky)
Injection-Date: Thu, 27 Oct 2022 19:52:43 +0000
Content-Type: text/plain; charset="UTF-8"
X-Received-Bytes: 1956
 by: Beliavsky - Thu, 27 Oct 2022 19:52 UTC

On Wednesday, October 26, 2022 at 4:56:09 PM UTC-4, Lynn McGuire wrote:
> Almost all of the Fortran compilers are now free. This is a bad sign,
> especially since Intel Fortran, the premier Fortran compiler, just
> jumped to free. To me, this says that future of Fortran is cloudy at best.

I disagree. The absence of free Fortran 90+ compilers until g95/gfortran
slowed the adoption of modern Fortran and caused Fortran to lose market
share, since Fortran 77, supported by the free g77, was not an appealing
language.

It's my impression that the commonly used C++ compilers are free ones --
clang, g++, and Microsoft Visual C++, yet C++ is a very popular language.

Re: converting a 700,000+ line Fortran 77 plus 50,000+ line C++ program to C++, part 1

<f2f39a9c-ab93-4981-865d-b6bc4e72d5d0n@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.fortran
X-Received: by 2002:a05:622a:1786:b0:39c:f3cd:b1d1 with SMTP id s6-20020a05622a178600b0039cf3cdb1d1mr43904706qtk.111.1666949043903;
Fri, 28 Oct 2022 02:24:03 -0700 (PDT)
X-Received: by 2002:a05:622a:4cc:b0:39c:bfb1:8a45 with SMTP id
q12-20020a05622a04cc00b0039cbfb18a45mr44459846qtx.647.1666949043700; Fri, 28
Oct 2022 02:24:03 -0700 (PDT)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!feed1.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: Fri, 28 Oct 2022 02:24:03 -0700 (PDT)
In-Reply-To: <tjei6d$2bmjq$1@newsreader4.netcologne.de>
Injection-Info: google-groups.googlegroups.com; posting-host=2601:602:9700:4689:8dfa:ccb4:44a4:6e5a;
posting-account=gLDX1AkAAAA26M5HM-O3sVMAXdxK9FPA
NNTP-Posting-Host: 2601:602:9700:4689:8dfa:ccb4:44a4:6e5a
References: <tj4egb$u68$1@gioia.aioe.org> <84aed433-6586-41af-b3d0-28dd17f9450bn@googlegroups.com>
<tjc6t5$2hrkt$1@dont-email.me> <tjei6d$2bmjq$1@newsreader4.netcologne.de>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <f2f39a9c-ab93-4981-865d-b6bc4e72d5d0n@googlegroups.com>
Subject: Re: converting a 700,000+ line Fortran 77 plus 50,000+ line C++
program to C++, part 1
From: gah4@u.washington.edu (gah4)
Injection-Date: Fri, 28 Oct 2022 09:24:03 +0000
Content-Type: text/plain; charset="UTF-8"
X-Received-Bytes: 2285
 by: gah4 - Fri, 28 Oct 2022 09:24 UTC

On Thursday, October 27, 2022 at 11:21:05 AM UTC-7, Thomas Koenig wrote:

(snip)

> I am not sure how compiler support of ASA carriage control
> by a compiler is supposed to look like (apart from the
> mandated leading space in free-form output).
The Fortran 66 standard has space, 0, 1, +, for skip to the next line,
next next line, next page, and stay on the same line.

I don't know how they work in earlier IBM systems.

For OS/360, you can have "machine carriage control", RECFM=FBM,
where the first column is the actual channel command code.

Unlike ASA, machine codes are print and then move, instead of
move and then print. If you use ASA characters, the OS converts
them at some point, before printing. Otherwise, any characters
not on the print train print as blanks, including backspace, new
line, carriage return, and line feed.

As for Fortran programs, mostly it means 1X, at the beginning
of most FORMAT strings.

Re: converting a 700,000+ line Fortran 77 plus 50,000+ line C++ program to C++, part 1

<tjicbf$r81$1@gioia.aioe.org>

  copy mid

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

  copy link   Newsgroups: comp.lang.fortran
Path: i2pn2.org!i2pn.org!aioe.org!mdf2aNOb2oCHynmZpuX5uw.user.46.165.242.91.POSTED!not-for-mail
From: lynnmcguire5@gmail.com (Lynn McGuire)
Newsgroups: comp.lang.fortran
Subject: Re: converting a 700,000+ line Fortran 77 plus 50,000+ line C++
program to C++, part 1
Date: Sat, 29 Oct 2022 00:05:50 -0500
Organization: Aioe.org NNTP Server
Message-ID: <tjicbf$r81$1@gioia.aioe.org>
References: <tj4egb$u68$1@gioia.aioe.org>
<84aed433-6586-41af-b3d0-28dd17f9450bn@googlegroups.com>
<tjc6t5$2hrkt$1@dont-email.me>
<35aea1e9-10eb-4949-993f-70eaab092237n@googlegroups.com>
<tjd2gj$k1i$1@gioia.aioe.org>
<25672c56-1322-46ca-a3c9-9e9b02ccf13fn@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="27905"; posting-host="mdf2aNOb2oCHynmZpuX5uw.user.gioia.aioe.org"; mail-complaints-to="abuse@aioe.org";
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101
Thunderbird/102.4.1
X-Notice: Filtered by postfilter v. 0.9.2
Content-Language: en-US
 by: Lynn McGuire - Sat, 29 Oct 2022 05:05 UTC

On 10/27/2022 2:56 AM, Robin Vowels wrote:
> On Thursday, October 27, 2022 at 3:47:19 PM UTC+11, Lynn McGuire wrote:
>> On 10/26/2022 7:59 PM, gah4 wrote:
> .
>>> I think if I was in the mood for doing it, it would be Java and not C++,
>>> but then that is just me.
> .
>> Would you really write a 750,000 line calculation engine in Java ?
> .
> I think the question that you should be asking yourself is
> "would you really write a 750,000 line calculation engine in C++ ?"

Since I am doing that, yes, in a heartbeat.

BTW, this is actually the third software program that I have converted
to C or C++. This is the biggest by far. My first was:
https://www.winsim.com/steam/steam.html

Thanks,
Lynn

Re: converting a 700,000+ line Fortran 77 plus 50,000+ line C++ program to C++, part 1

<tjjc5l$2eqds$1@newsreader4.netcologne.de>

  copy mid

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

  copy link   Newsgroups: comp.lang.fortran
Path: i2pn2.org!i2pn.org!aioe.org!news.uzoreto.com!newsreader4.netcologne.de!news.netcologne.de!.POSTED.2a0a-a540-3cee-0-7285-c2ff-fe6c-992d.ipv6dyn.netcologne.de!not-for-mail
From: tkoenig@netcologne.de (Thomas Koenig)
Newsgroups: comp.lang.fortran
Subject: Re: converting a 700,000+ line Fortran 77 plus 50,000+ line C++
program to C++, part 1
Date: Sat, 29 Oct 2022 14:08:53 -0000 (UTC)
Organization: news.netcologne.de
Distribution: world
Message-ID: <tjjc5l$2eqds$1@newsreader4.netcologne.de>
References: <tj4egb$u68$1@gioia.aioe.org>
<84aed433-6586-41af-b3d0-28dd17f9450bn@googlegroups.com>
<tjc6t5$2hrkt$1@dont-email.me>
<35aea1e9-10eb-4949-993f-70eaab092237n@googlegroups.com>
<tjd2gj$k1i$1@gioia.aioe.org>
<25672c56-1322-46ca-a3c9-9e9b02ccf13fn@googlegroups.com>
<tjicbf$r81$1@gioia.aioe.org>
Injection-Date: Sat, 29 Oct 2022 14:08:53 -0000 (UTC)
Injection-Info: newsreader4.netcologne.de; posting-host="2a0a-a540-3cee-0-7285-c2ff-fe6c-992d.ipv6dyn.netcologne.de:2a0a:a540:3cee:0:7285:c2ff:fe6c:992d";
logging-data="2582972"; mail-complaints-to="abuse@netcologne.de"
User-Agent: slrn/1.0.3 (Linux)
 by: Thomas Koenig - Sat, 29 Oct 2022 14:08 UTC

Lynn McGuire <lynnmcguire5@gmail.com> schrieb:
> On 10/27/2022 2:56 AM, Robin Vowels wrote:
>> On Thursday, October 27, 2022 at 3:47:19 PM UTC+11, Lynn McGuire wrote:
>>> On 10/26/2022 7:59 PM, gah4 wrote:
>> .
>>>> I think if I was in the mood for doing it, it would be Java and not C++,
>>>> but then that is just me.
>> .
>>> Would you really write a 750,000 line calculation engine in Java ?
>> .
>> I think the question that you should be asking yourself is
>> "would you really write a 750,000 line calculation engine in C++ ?"
>
> Since I am doing that, yes, in a heartbeat.
>
> BTW, this is actually the third software program that I have converted
> to C or C++. This is the biggest by far. My first was:
> https://www.winsim.com/steam/steam.html

That looks nice, steam properties are something that you sometimes
need...

One of the first applied programs I ever wrote was the simulation
for a steam turbine. For his job, my father had a MS-DOS program
which calculated steam properties (you could add the usual values,
and it would calculate the rest). Via a MS-DOS batch file, I
then wrote a program to calculate steam turbine expansion if an
isentropic efficiency was given.

Another story along these lines... quite some years ago, we
were sitting in a conference room, and the question came up what
temperature corresponded to a certain steam pressure in one of
our plants. A colleague from Thailand then took a steam table
out of his shirt pocket and supplied the answer. Never leave
home without it :-)

Re: converting a 700,000+ line Fortran 77 plus 50,000+ line C++ program to C++, part 1

<tjjt5t$9nd$1@gioia.aioe.org>

  copy mid

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

  copy link   Newsgroups: comp.lang.fortran
Path: i2pn2.org!i2pn.org!aioe.org!mdf2aNOb2oCHynmZpuX5uw.user.46.165.242.91.POSTED!not-for-mail
From: lynnmcguire5@gmail.com (Lynn McGuire)
Newsgroups: comp.lang.fortran
Subject: Re: converting a 700,000+ line Fortran 77 plus 50,000+ line C++
program to C++, part 1
Date: Sat, 29 Oct 2022 13:59:08 -0500
Organization: Aioe.org NNTP Server
Message-ID: <tjjt5t$9nd$1@gioia.aioe.org>
References: <tj4egb$u68$1@gioia.aioe.org>
<84aed433-6586-41af-b3d0-28dd17f9450bn@googlegroups.com>
<tjc6t5$2hrkt$1@dont-email.me>
<35aea1e9-10eb-4949-993f-70eaab092237n@googlegroups.com>
<tjd2gj$k1i$1@gioia.aioe.org>
<25672c56-1322-46ca-a3c9-9e9b02ccf13fn@googlegroups.com>
<tjicbf$r81$1@gioia.aioe.org> <tjjc5l$2eqds$1@newsreader4.netcologne.de>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Info: gioia.aioe.org; logging-data="9965"; posting-host="mdf2aNOb2oCHynmZpuX5uw.user.gioia.aioe.org"; mail-complaints-to="abuse@aioe.org";
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101
Thunderbird/102.4.1
X-Notice: Filtered by postfilter v. 0.9.2
Content-Language: en-US
 by: Lynn McGuire - Sat, 29 Oct 2022 18:59 UTC

On 10/29/2022 9:08 AM, Thomas Koenig wrote:
> Lynn McGuire <lynnmcguire5@gmail.com> schrieb:
>> On 10/27/2022 2:56 AM, Robin Vowels wrote:
>>> On Thursday, October 27, 2022 at 3:47:19 PM UTC+11, Lynn McGuire wrote:
>>>> On 10/26/2022 7:59 PM, gah4 wrote:
>>> .
>>>>> I think if I was in the mood for doing it, it would be Java and not C++,
>>>>> but then that is just me.
>>> .
>>>> Would you really write a 750,000 line calculation engine in Java ?
>>> .
>>> I think the question that you should be asking yourself is
>>> "would you really write a 750,000 line calculation engine in C++ ?"
>>
>> Since I am doing that, yes, in a heartbeat.
>>
>> BTW, this is actually the third software program that I have converted
>> to C or C++. This is the biggest by far. My first was:
>> https://www.winsim.com/steam/steam.html
>
> That looks nice, steam properties are something that you sometimes
> need...
>
> One of the first applied programs I ever wrote was the simulation
> for a steam turbine. For his job, my father had a MS-DOS program
> which calculated steam properties (you could add the usual values,
> and it would calculate the rest). Via a MS-DOS batch file, I
> then wrote a program to calculate steam turbine expansion if an
> isentropic efficiency was given.
>
> Another story along these lines... quite some years ago, we
> were sitting in a conference room, and the question came up what
> temperature corresponded to a certain steam pressure in one of
> our plants. A colleague from Thailand then took a steam table
> out of his shirt pocket and supplied the answer. Never leave
> home without it :-)

Yup, the old Combustion Engineering Steam Table pamphlets. A CE boiler
guy would stop by and hand them out like candy. I have 2 or 3 of them
still. They are the 1967 ASME steam table which my software is. I have
a program that calculates steam turbine efficiency called Isencalc
available on that page. Someday I am going to convert it from DOS to Win32.
https://www.amazon.com/Steam-Tables-Properties-Saturated-Superheated/dp/B003O5S3ZW/

My process simulation software has the 1991 Steam Tables in it along
with 60 other equations of state.
https://www.winsim.com/index.html

Lynn

Re: converting a 700,000+ line Fortran 77 plus 50,000+ line C++ program to C++, part 1

<tjju0g$3l0si$1@dont-email.me>

  copy mid

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

  copy link   Newsgroups: comp.lang.fortran
Path: i2pn2.org!i2pn.org!aioe.org!eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail
From: garylscott@sbcglobal.net (Gary Scott)
Newsgroups: comp.lang.fortran
Subject: Re: converting a 700,000+ line Fortran 77 plus 50,000+ line C++
program to C++, part 1
Date: Sat, 29 Oct 2022 14:13:20 -0500
Organization: A noiseless patient Spider
Lines: 55
Message-ID: <tjju0g$3l0si$1@dont-email.me>
References: <tj4egb$u68$1@gioia.aioe.org>
<84aed433-6586-41af-b3d0-28dd17f9450bn@googlegroups.com>
<tjc6t5$2hrkt$1@dont-email.me>
<35aea1e9-10eb-4949-993f-70eaab092237n@googlegroups.com>
<tjd2gj$k1i$1@gioia.aioe.org>
<25672c56-1322-46ca-a3c9-9e9b02ccf13fn@googlegroups.com>
<tjicbf$r81$1@gioia.aioe.org> <tjjc5l$2eqds$1@newsreader4.netcologne.de>
<tjjt5t$9nd$1@gioia.aioe.org>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Sat, 29 Oct 2022 19:13:20 -0000 (UTC)
Injection-Info: reader01.eternal-september.org; posting-host="f1d2d4cb9b49082ad44eba6d1dcf1b22";
logging-data="3834770"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+l5Ypuf9u2qObV1C3n/DNIRsQoU9LRZyU="
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101
Thunderbird/102.4.1
Cancel-Lock: sha1:tStodmRDfG/wkWvVMUIsN33c/Ow=
Content-Language: en-US
In-Reply-To: <tjjt5t$9nd$1@gioia.aioe.org>
 by: Gary Scott - Sat, 29 Oct 2022 19:13 UTC

On 10/29/2022 1:59 PM, Lynn McGuire wrote:
> On 10/29/2022 9:08 AM, Thomas Koenig wrote:
>> Lynn McGuire <lynnmcguire5@gmail.com> schrieb:
>>> On 10/27/2022 2:56 AM, Robin Vowels wrote:
>>>> On Thursday, October 27, 2022 at 3:47:19 PM UTC+11, Lynn McGuire wrote:
>>>>> On 10/26/2022 7:59 PM, gah4 wrote:
>>>> .
>>>>>> I think if I was in the mood for doing it, it would be Java and
>>>>>> not C++,
>>>>>> but then that is just me.
>>>> .
>>>>> Would you really write a 750,000 line calculation engine in Java ?
>>>> .
>>>> I think the question that you should be asking yourself is
>>>> "would you really write a 750,000 line calculation engine in C++ ?"
>>>
>>> Since I am doing that, yes, in a heartbeat.
>>>
>>> BTW, this is actually the third software program that I have converted
>>> to C or C++.  This is the biggest by far.  My first was:
>>>      https://www.winsim.com/steam/steam.html
>>
>> That looks nice, steam properties are something that you sometimes
>> need...
>>
>> One of the first applied programs I ever wrote was the simulation
>> for a steam turbine.  For his job, my father had a MS-DOS program
>> which calculated steam properties (you could add the usual values,
>> and it would calculate the rest).  Via a MS-DOS batch file, I
>> then wrote a program to calculate steam turbine expansion if an
>> isentropic efficiency was given.
>>
>> Another story along these lines... quite some years ago, we
>> were sitting in a conference room, and the question came up what
>> temperature corresponded to a certain steam pressure in one of
>> our plants.  A colleague from Thailand then took a steam table
>> out of his shirt pocket and supplied the answer.  Never leave
>> home without it :-)
>
> Yup, the old Combustion Engineering Steam Table pamphlets.  A CE boiler
> guy would stop by and hand them out like candy.  I have 2 or 3 of them
> still.  They are the 1967 ASME steam table which my software is.  I have
> a program that calculates steam turbine efficiency called Isencalc
> available on that page.  Someday I am going to convert it from DOS to
> Win32.
>
> https://www.amazon.com/Steam-Tables-Properties-Saturated-Superheated/dp/B003O5S3ZW/
>
> My process simulation software has the 1991 Steam Tables in it along
> with 60 other equations of state.
>    https://www.winsim.com/index.html
>
> Lynn
>
CO2 is the wave of the future, any adaptations?

Re: converting a 700,000+ line Fortran 77 plus 50,000+ line C++ program to C++, part 1

<tjjviu$1bi8$1@gioia.aioe.org>

  copy mid

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

  copy link   Newsgroups: comp.lang.fortran
Path: i2pn2.org!i2pn.org!aioe.org!mdf2aNOb2oCHynmZpuX5uw.user.46.165.242.91.POSTED!not-for-mail
From: lynnmcguire5@gmail.com (Lynn McGuire)
Newsgroups: comp.lang.fortran
Subject: Re: converting a 700,000+ line Fortran 77 plus 50,000+ line C++
program to C++, part 1
Date: Sat, 29 Oct 2022 14:40:13 -0500
Organization: Aioe.org NNTP Server
Message-ID: <tjjviu$1bi8$1@gioia.aioe.org>
References: <tj4egb$u68$1@gioia.aioe.org>
<84aed433-6586-41af-b3d0-28dd17f9450bn@googlegroups.com>
<tjc6t5$2hrkt$1@dont-email.me> <tjei6d$2bmjq$1@newsreader4.netcologne.de>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Info: gioia.aioe.org; logging-data="44616"; posting-host="mdf2aNOb2oCHynmZpuX5uw.user.gioia.aioe.org"; mail-complaints-to="abuse@aioe.org";
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101
Thunderbird/102.4.1
Content-Language: en-US
X-Notice: Filtered by postfilter v. 0.9.2
 by: Lynn McGuire - Sat, 29 Oct 2022 19:40 UTC

On 10/27/2022 1:21 PM, Thomas Koenig wrote:
> Lynn McGuire <lynnmcguire5@gmail.com> schrieb:
>
>> We used three features in our F66 / F77 code which are turning out to be
>> problematic in porting to a new Fortran compiler that supports 64 bit
>> software. The first is the carriage control option in printing to
>> stdout or a file. This was never a Fortran standard feature but
>> everyone used it back in the 1960s, 1970s, and 1980s. This killed our
>> port to gfortran several years ago but it is now supported there
>> reputedly.
>
> I am not sure how compiler support of ASA carriage control
> by a compiler is supposed to look like (apart from the
> mandated leading space in free-form output).
>
> The traditional UNIX way is to pipe it through asa(1), which
> emulates the traditional carriage control with overstrike
> characters etc. This is reasonably easy to write, I once
> wrote such a utility myself (and lost the source) but Debian
> has it. Source at https://sources.debian.org/src/asa/1.2-1.1/ .
>
>> We are ripping it out of our formats as a part of our
>> conversion to C++.
>
> Good riddance.
>
>> We use zero initialization of all global and local variables. This
>> killed our first port to Intel Fortran in 2005 ??? when it uncovered a
>> linker bug / crash. We have removed the need for this from a portion of
>> our Fortran code but will be a problem in the C++ conversion.
>
> That is a bigger problem.
>
> Not sure if your code runs under Linux. If it does, you might want
> to run it under valgrind, which will generate tons of errors if
> undefined variables are used.
>
>> We use Fortran structures, popularized by DEC back in the 1970s and
>> 1980s, but they never became part of the Fortran standard. We are
>> converting our structure code to integer*8 and logical*8 as a part of
>> the C++ port.
>
> Huh?
>
>> Almost all of the Fortran compilers are now free. This is a bad sign,
>> especially since Intel Fortran, the premier Fortran compiler, just
>> jumped to free. To me, this says that future of Fortran is cloudy at best.
>
> Why should this be a bad thing? Intel uses the compiler to sell chips,
> and so does IBM for POWER.
>
>> Nothing in this world is perfect but moving to a single programming
>> language should help us in the long run. Our software is embeddable in
>> Excel or can embed Excel in itself, all my glue code is in C++ which
>> really points the direction to me.
>
> In the immortal words of a J3 member...
>
> " Hiring someone else to write your C++ code is probably a good
> idea for preserving sanity. Although having to read the code
> later will undo any of the previously mentioned benefits."

We have had almost a hundred programmers over the years, mostly chemical
and mechanical engineers from a dozen countries. The code reads like a
very diverse document. The subroutine names are very ... interesting.

Lynn

Re: converting a 700,000+ line Fortran 77 plus 50,000+ line C++ program to C++, part 1

<tjmldh$18kl$1@gioia.aioe.org>

  copy mid

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

  copy link   Newsgroups: comp.lang.fortran
Path: i2pn2.org!i2pn.org!aioe.org!mdf2aNOb2oCHynmZpuX5uw.user.46.165.242.91.POSTED!not-for-mail
From: lynnmcguire5@gmail.com (Lynn McGuire)
Newsgroups: comp.lang.fortran
Subject: Re: converting a 700,000+ line Fortran 77 plus 50,000+ line C++
program to C++, part 1
Date: Sun, 30 Oct 2022 15:05:04 -0500
Organization: Aioe.org NNTP Server
Message-ID: <tjmldh$18kl$1@gioia.aioe.org>
References: <tj4egb$u68$1@gioia.aioe.org>
<84aed433-6586-41af-b3d0-28dd17f9450bn@googlegroups.com>
<tjc6t5$2hrkt$1@dont-email.me>
<35aea1e9-10eb-4949-993f-70eaab092237n@googlegroups.com>
<tjd2gj$k1i$1@gioia.aioe.org>
<25672c56-1322-46ca-a3c9-9e9b02ccf13fn@googlegroups.com>
<tjicbf$r81$1@gioia.aioe.org> <tjjc5l$2eqds$1@newsreader4.netcologne.de>
<tjjt5t$9nd$1@gioia.aioe.org> <tjju0g$3l0si$1@dont-email.me>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Info: gioia.aioe.org; logging-data="41621"; posting-host="mdf2aNOb2oCHynmZpuX5uw.user.gioia.aioe.org"; mail-complaints-to="abuse@aioe.org";
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101
Thunderbird/102.4.1
Content-Language: en-US
X-Notice: Filtered by postfilter v. 0.9.2
 by: Lynn McGuire - Sun, 30 Oct 2022 20:05 UTC

On 10/29/2022 2:13 PM, Gary Scott wrote:
> On 10/29/2022 1:59 PM, Lynn McGuire wrote:
>> On 10/29/2022 9:08 AM, Thomas Koenig wrote:
>>> Lynn McGuire <lynnmcguire5@gmail.com> schrieb:
>>>> On 10/27/2022 2:56 AM, Robin Vowels wrote:
>>>>> On Thursday, October 27, 2022 at 3:47:19 PM UTC+11, Lynn McGuire
>>>>> wrote:
>>>>>> On 10/26/2022 7:59 PM, gah4 wrote:
>>>>> .
>>>>>>> I think if I was in the mood for doing it, it would be Java and
>>>>>>> not C++,
>>>>>>> but then that is just me.
>>>>> .
>>>>>> Would you really write a 750,000 line calculation engine in Java ?
>>>>> .
>>>>> I think the question that you should be asking yourself is
>>>>> "would you really write a 750,000 line calculation engine in C++ ?"
>>>>
>>>> Since I am doing that, yes, in a heartbeat.
>>>>
>>>> BTW, this is actually the third software program that I have converted
>>>> to C or C++.  This is the biggest by far.  My first was:
>>>>      https://www.winsim.com/steam/steam.html
>>>
>>> That looks nice, steam properties are something that you sometimes
>>> need...
>>>
>>> One of the first applied programs I ever wrote was the simulation
>>> for a steam turbine.  For his job, my father had a MS-DOS program
>>> which calculated steam properties (you could add the usual values,
>>> and it would calculate the rest).  Via a MS-DOS batch file, I
>>> then wrote a program to calculate steam turbine expansion if an
>>> isentropic efficiency was given.
>>>
>>> Another story along these lines... quite some years ago, we
>>> were sitting in a conference room, and the question came up what
>>> temperature corresponded to a certain steam pressure in one of
>>> our plants.  A colleague from Thailand then took a steam table
>>> out of his shirt pocket and supplied the answer.  Never leave
>>> home without it :-)
>>
>> Yup, the old Combustion Engineering Steam Table pamphlets.  A CE
>> boiler guy would stop by and hand them out like candy.  I have 2 or 3
>> of them still.  They are the 1967 ASME steam table which my software
>> is.  I have a program that calculates steam turbine efficiency called
>> Isencalc available on that page.  Someday I am going to convert it
>> from DOS to Win32.
>>
>> https://www.amazon.com/Steam-Tables-Properties-Saturated-Superheated/dp/B003O5S3ZW/
>>
>> My process simulation software has the 1991 Steam Tables in it along
>> with 60 other equations of state.
>>     https://www.winsim.com/index.html
>>
>> Lynn
>>
> CO2 is the wave of the future, any adaptations?

Of course, we are general purpose process simulator. CO2 was part of
the original package in 1969. It is component #49 out of the original
62. There are almost 1,300 components now.

Lynn

1
server_pubkey.txt

rocksolid light 0.9.81
clearnet tor