(j3.2006) Select Rank
Rafik Zurob
rzurob
Sun Feb 15 20:52:19 EST 2015
SELECT RANK was proposed by Tobias on Feb 17, 2013 (See
http://mailman.j3-fortran.org/pipermail/j3/2013-February/006144.html and
14-189). Its proposed syntax is consistent with what you have below. Its
effect can be achieved via select case + block + c_f_pointer. IIRC, it
was one of the candidate features discussed in the meeting where the
Fortran 2015 candidate features were considered. It didn't make the final
list.
Regards
Rafik
j3-bounces at mailman.j3-fortran.org wrote on 14/02/2015 11:59:03 AM:
> From: "Whitlock, Stan" <stan.whitlock at intel.com>
> To: fortran standards email list for J3 <j3 at mailman.j3-fortran.org>
> Date: 14/02/2015 12:00 PM
> Subject: Re: (j3.2006) Select Rank
> Sent by: j3-bounces at mailman.j3-fortran.org
>
> I'm not advocating a new feature at this late date but I don't see
> Bill's suggestion as getting me very far. In:
>
> select case (rank(A))
>
> case (1)
> ...
> case (2)
> ...
>
> end select
>
> in case (1) I can't say:
>
> A (4) = 1 ! assuming A has a 4th element
>
> But we could probably define SELECT RANK so you could say:
>
> select rand (A)
>
> case (1)
> A (4) = 1
> case (2)
> A (2,3) = 1
> end select rank
>
> /Stan
>
> -----Original Message-----
> From: j3-bounces at mailman.j3-fortran.org [mailto:j3-
> bounces at mailman.j3-fortran.org] On Behalf Of Bill Long
> Sent: Friday, February 13, 2015 8:19 AM
> To: Van Snyder; fortran standards email list for J3
> Subject: Re: (j3.2006) Select Rank
>
>
> On Feb 12, 2015, at 6:46 PM, Van Snyder <Van.Snyder at jpl.nasa.gov> wrote:
>
> > A Select Rank construct has been proposed, to go along with
> > Dimension(..).
>
> By whom? Select Rank was proposed a long time ago and rejected.
> Instead we have the RANK() intrinsic. With that you can
>
> select case (rank(A))
>
> case (1)
> ...
> case (2)
> ...
>
> end select
>
> Cheers,
> Bill
>
>
> >
> > It might also be useful independently from Dimension(..), in include
> > files.
> _______________________________________________
> J3 mailing list
> J3 at mailman.j3-fortran.org
> http://mailman.j3-fortran.org/mailman/listinfo/j3
>
More information about the J3
mailing list