Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.c++ > #87264

Re: how to do implied do loops on write statements in C++ ?

From Lynn McGuire <lynnmcguire5@gmail.com>
Newsgroups comp.lang.c++, comp.lang.c
Subject Re: how to do implied do loops on write statements in C++ ?
Date 2022-11-05 19:04 -0500
Organization Aioe.org NNTP Server
Message-ID <tk6tmr$b5k$1@gioia.aioe.org> (permalink)
References <tk6gbg$180g$1@gioia.aioe.org> <18859f39-7a4a-4935-9e90-e844eae87df9n@googlegroups.com>

Cross-posted to 2 groups.

Show all headers | View raw


On 11/5/2022 3:29 PM, Michael S wrote:
> On Saturday, November 5, 2022 at 10:17:05 PM UTC+2, Lynn McGuire wrote:
>> In converting my F77 code to C++, I am wondering how to do implied do
>> loops on write statements in C / C++ ?
>>
>> write (oufile, 54555) (xyz (i), i = 1, ncp)
>> 54555 format ('xyz=', (1x, g14.7), /)
>>
>> Thanks,
>> Lynn
> 
> There is no direct equivalent in C++ .
> You can use non-direct equivalents like like std::for_each(),
> but if you value your sanity, please do not.
> Just write explicit for() loop.

That is what I do now.

Thanks,
Lynn

Back to comp.lang.c++ | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

how to do implied do loops on write statements in C++ ? Lynn McGuire <lynnmcguire5@gmail.com> - 2022-11-05 15:16 -0500
  Re: how to do implied do loops on write statements in C++ ? Michael S <already5chosen@yahoo.com> - 2022-11-05 13:29 -0700
    Re: how to do implied do loops on write statements in C++ ? Bonita Montero <Bonita.Montero@gmail.com> - 2022-11-05 21:35 +0100
    Re: how to do implied do loops on write statements in C++ ? Lynn McGuire <lynnmcguire5@gmail.com> - 2022-11-05 19:04 -0500

csiph-web