public inbox for fortran@gcc.gnu.org
 help / color / mirror / Atom feed
From: Arjen Markus <arjen.markus895@gmail.com>
To: Lars G Golmen <lars.golmen@niva.no>
Cc: Fortran List <fortran@gcc.gnu.org>
Subject: Re: Fortran issue
Date: Sat, 27 Aug 2022 15:23:44 +0200	[thread overview]
Message-ID: <CAMCbSMqBo2pEw7jJ8W58wnMgqgkZBtPJE_AeCRY0XUBqZUc14Q@mail.gmail.com> (raw)
In-Reply-To: <OSWP279MB032540A197A2502028C67BC7E5749@OSWP279MB0325.NORP279.PROD.OUTLOOK.COM>

The backslash is probably an extension to keep the cursor on the same. You
can achieve that by using advance='no' in the write statement.
Note that some compilers may require a flush statement to actually make the
text visible.

Regards,

Arjen

Op za 27 aug. 2022 15:19 schreef Lars G Golmen <lars.golmen@niva.no>:

>
> Hello
> I have an old, small Fortran 4 program doing some statistics on time
> series: Aandstat.
> The .EXE file ran on 32 bits PC with like XP-OS, but not anymore on 64
> bits.
>
> A colleague on mine tried compile the attached code in gfortran.
> The gfortran compilation gave a couple of error messages, gfortran does
> not seem to accept the “\” sign.
> Is there a valid replacement for that sign (command) we can use, to get
> quickly forward?
>
> Sorry for any inconvenience.
>
> Best regards
> Lars Golmen
>
> ----------------------------------------------------------------------------------------------------
> Lars G. Golmen, oceanographer, senior research scientist, Adj. professor
> NIVA, Norwegian Institute for Water Research - Bergen and Runde branch,
> Tel: (47) 4789 0957, Address: c/o Runde miljøsenter, N-6096 Runde, Norway
> Tokyo University of Marine Science and Technology, 4-5-7 Konan, Minato,
> Tokyo.
> http://www.niva.no<http://www.niva.no/>
> http://www.rundecentre.no<http://www.rundecentre.no/>
> https://www.kaiyodai.ac.jp/english/
>  << Fil: AANDSTAT.FOR >>
> _____________________________________________
> Frå: Shamil Iakubov <shamil.iakubov@niva.no>
> Send: torsdag 25. august 2022 20:35
> Til: Lars G Golmen <lars.golmen@niva.no>
> Emne: RE: Fortran
>
>
> Hi Lars!
>
> Fortran is exciting, in fact it has evolved significantly during the last
> few years and it fits modern standards nowadays, except for the building
> system probably. Also, some of the most in demand machine learning
> libraries still use Fortran code.
>
> Regarding your problem. I have tried to compile it with gfortran, it is a
> free open source compiler. It throws some errors:
>
> ```
> (base) lmsh@l5:~/src/lars_fortran$ gfortran AANDSTAT.FOR -std=legacy -o
> program
> AANDSTAT.FOR:27:22:
>
>    27 |  10      WRITE(*,'(//,A\)')' OPPGI FILNAMN FOR INPUT DATA-->'
>       |                      1
> Error: Unexpected element ‘\’ in format string at (1)
> AANDSTAT.FOR:30:17:
>
>    30 |        WRITE(*,'(A\)')' OPPGI FILNAMN FOR RESULTAT (NY FIL)-->'
>       |                 1
> Error: Unexpected element ‘\’ in format string at (1)
> (base) lmsh@l5:~/src/lars_fortran$
>
> Some googling proved that the code is compiler specific. It can be
> compiled with the Intel compiler (ifort). Sadly it is not free now. I
> believe NIVA has VisualStudio license with ifort so your files can be
> compiled with visual studio solutions building system, but currently I
> don’t have access to these facilities.
>
> Cheers,
> Shamil
>
> _____________________________________________
> From: Lars G Golmen <lars.golmen@niva.no<mailto:lars.golmen@niva.no>>
> Sent: torsdag 25. august 2022 13:29
> To: Shamil Iakubov <shamil.iakubov@niva.no<mailto:shamil.iakubov@niva.no>>
> Subject: Fortran
>
>
> Hei Shamil
> Nice to know you do Fortran.
> I worked with Fortran many years ago, Fortran 4.. on old computers. My
> compliler no longer works.
> Is it possible for you to recompile some source code I have, to work on
> present OS?
> I attach an example, just one program, no subroutines to map here. To make
> some special statistics on a equidistant time series. Input file name to be
> provided, 2 columns w ascii data.
> OK?
> (I have several others..🙂)
>
> Helsing
> Lars G
>  << File: AANDSTAT.FOR >>
>
>

WARNING: multiple messages have this Message-ID
From: Arjen Markus <arjen.markus895@gmail.com>
To: Lars G Golmen <lars.golmen@niva.no>
Cc: Fortran List <fortran@gcc.gnu.org>
Subject: Re: Fortran issue
Date: Sat, 27 Aug 2022 15:23:44 +0200	[thread overview]
Message-ID: <CAMCbSMqBo2pEw7jJ8W58wnMgqgkZBtPJE_AeCRY0XUBqZUc14Q@mail.gmail.com> (raw)
Message-ID: <20220827132344.ZN0lczeRsCW_HaM7XBSQ8sJ8AsgAuKghu3yb40GsQD0@z> (raw)
In-Reply-To: <OSWP279MB032540A197A2502028C67BC7E5749@OSWP279MB0325.NORP279.PROD.OUTLOOK.COM>

[-- Attachment #1: Type: text/plain, Size: 3751 bytes --]

The backslash is probably an extension to keep the cursor on the same. You
can achieve that by using advance='no' in the write statement.
Note that some compilers may require a flush statement to actually make the
text visible.

Regards,

Arjen

Op za 27 aug. 2022 15:19 schreef Lars G Golmen <lars.golmen@niva.no>:

>
> Hello
> I have an old, small Fortran 4 program doing some statistics on time
> series: Aandstat.
> The .EXE file ran on 32 bits PC with like XP-OS, but not anymore on 64
> bits.
>
> A colleague on mine tried compile the attached code in gfortran.
> The gfortran compilation gave a couple of error messages, gfortran does
> not seem to accept the “\” sign.
> Is there a valid replacement for that sign (command) we can use, to get
> quickly forward?
>
> Sorry for any inconvenience.
>
> Best regards
> Lars Golmen
>
> ----------------------------------------------------------------------------------------------------
> Lars G. Golmen, oceanographer, senior research scientist, Adj. professor
> NIVA, Norwegian Institute for Water Research - Bergen and Runde branch,
> Tel: (47) 4789 0957, Address: c/o Runde miljøsenter, N-6096 Runde, Norway
> Tokyo University of Marine Science and Technology, 4-5-7 Konan, Minato,
> Tokyo.
> http://www.niva.no<http://www.niva.no/>
> http://www.rundecentre.no<http://www.rundecentre.no/>
> https://www.kaiyodai.ac.jp/english/
>  << Fil: AANDSTAT.FOR >>
> _____________________________________________
> Frå: Shamil Iakubov <shamil.iakubov@niva.no>
> Send: torsdag 25. august 2022 20:35
> Til: Lars G Golmen <lars.golmen@niva.no>
> Emne: RE: Fortran
>
>
> Hi Lars!
>
> Fortran is exciting, in fact it has evolved significantly during the last
> few years and it fits modern standards nowadays, except for the building
> system probably. Also, some of the most in demand machine learning
> libraries still use Fortran code.
>
> Regarding your problem. I have tried to compile it with gfortran, it is a
> free open source compiler. It throws some errors:
>
> ```
> (base) lmsh@l5:~/src/lars_fortran$ gfortran AANDSTAT.FOR -std=legacy -o
> program
> AANDSTAT.FOR:27:22:
>
>    27 |  10      WRITE(*,'(//,A\)')' OPPGI FILNAMN FOR INPUT DATA-->'
>       |                      1
> Error: Unexpected element ‘\’ in format string at (1)
> AANDSTAT.FOR:30:17:
>
>    30 |        WRITE(*,'(A\)')' OPPGI FILNAMN FOR RESULTAT (NY FIL)-->'
>       |                 1
> Error: Unexpected element ‘\’ in format string at (1)
> (base) lmsh@l5:~/src/lars_fortran$
>
> Some googling proved that the code is compiler specific. It can be
> compiled with the Intel compiler (ifort). Sadly it is not free now. I
> believe NIVA has VisualStudio license with ifort so your files can be
> compiled with visual studio solutions building system, but currently I
> don’t have access to these facilities.
>
> Cheers,
> Shamil
>
> _____________________________________________
> From: Lars G Golmen <lars.golmen@niva.no<mailto:lars.golmen@niva.no>>
> Sent: torsdag 25. august 2022 13:29
> To: Shamil Iakubov <shamil.iakubov@niva.no<mailto:shamil.iakubov@niva.no>>
> Subject: Fortran
>
>
> Hei Shamil
> Nice to know you do Fortran.
> I worked with Fortran many years ago, Fortran 4.. on old computers. My
> compliler no longer works.
> Is it possible for you to recompile some source code I have, to work on
> present OS?
> I attach an example, just one program, no subroutines to map here. To make
> some special statistics on a equidistant time series. Input file name to be
> provided, 2 columns w ascii data.
> OK?
> (I have several others..🙂)
>
> Helsing
> Lars G
>  << File: AANDSTAT.FOR >>
>
>

  parent reply	other threads:[~2022-08-27 13:23 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-27 13:19 Lars G Golmen
2022-08-27 13:19 ` Lars G Golmen
2022-08-27 13:23 ` Arjen Markus [this message]
2022-08-27 13:23   ` Arjen Markus

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAMCbSMqBo2pEw7jJ8W58wnMgqgkZBtPJE_AeCRY0XUBqZUc14Q@mail.gmail.com \
    --to=arjen.markus895@gmail.com \
    --cc=fortran@gcc.gnu.org \
    --cc=lars.golmen@niva.no \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).