[J3] [EXTERNAL] Re: New intrinsic XXX_PREFIX and XXX_SUFFIX procedures
Van Snyder
van.snyder at sbcglobal.net
Fri Jan 27 00:59:31 UTC 2023
On Thu, 2023-01-26 at 20:36 +0000, Clune, Thomas L. (GSFC-6101) wrote:
> Hi Van,
>
> I don’t think I follow your suggestion. How does one use an
> enumerator as an operation?
It's not an operation. It's the identifier of an operation. And, for
good measure, it ought to be an enumerator, i.e., a constant, not a
value of the specified enumeration type, so the processor can work out
which scan operation to do at compile time. If you want to select the
operation at run time, use the form in which OPERATION is a function.
>
> * Tom
>
> From:J3 <j3-bounces at mailman.j3-fortran.org> on behalf of j3
> <j3 at mailman.j3-fortran.org>
> Reply-To: j3 <j3 at mailman.j3-fortran.org>
> Date: Thursday, January 26, 2023 at 1:46 PM
> To: j3 <j3 at mailman.j3-fortran.org>
> Cc: Van Snyder <van.snyder at sbcglobal.net>
> Subject: [EXTERNAL] Re: [J3] New intrinsic XXX_PREFIX and XXX_SUFFIX
> procedures
>
> On Thu, 2023-01-26 at 16:52 +0000, Brad Richardson via J3 wrote:
> > I've been pondering this more, and I think the way I'd like to
> > propose
> > this is as a single new intrinsic. I think it could in theory be
> > named
> > SCAN, as the interface would be fully distinguishable from the
> > existing
> > SCAN intrinsic for character set membership search. The interface
> > would
> > be:
> >
> > SCAN(ARRAY, OPERATION[, IDENTITY, DIM, MASK, SEGMENT, EXCLUSIVE,
> > REVERSED, ORDERED])
>
> There should be two varieties of OPERATION. One would be an
> enumerator of an enumeration type defined in ISO_Fortran_Env. The
> other would be a two-argument function provided by the user.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.j3-fortran.org/pipermail/j3/attachments/20230126/53469182/attachment.htm>
More information about the J3
mailing list