public inbox for fortran@gcc.gnu.org
 help / color / mirror / Atom feed
* FINDLOC documentation at https://gcc.gnu.org/onlinedocs/gfortran/FINDLOC.html
@ 2021-02-09 20:41 Kay Diederichs
  2021-02-09 21:18 ` [Patch] Fortran: intrinsic.texi add missing arg to FINDLOC (was: FINDLOC documentation at https://gcc.gnu.org/onlinedocs/gfortran/FINDLOC.html) Tobias Burnus
  0 siblings, 1 reply; 4+ messages in thread
From: Kay Diederichs @ 2021-02-09 20:41 UTC (permalink / raw)
  To: fortran

Dear gfortran developers,

the above link does not document the optional MASK argument. Could somebody fix this, please?

thanks,
Kay 


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Patch] Fortran: intrinsic.texi add missing arg to FINDLOC (was: FINDLOC documentation at https://gcc.gnu.org/onlinedocs/gfortran/FINDLOC.html)
  2021-02-09 20:41 FINDLOC documentation at https://gcc.gnu.org/onlinedocs/gfortran/FINDLOC.html Kay Diederichs
@ 2021-02-09 21:18 ` Tobias Burnus
  2021-02-09 21:54   ` Thomas Koenig
  0 siblings, 1 reply; 4+ messages in thread
From: Tobias Burnus @ 2021-02-09 21:18 UTC (permalink / raw)
  To: Kay Diederichs, fortran, gcc-patches

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

Hi Kay, hi all,

On 09.02.21 21:41, Kay Diederichs wrote:
> the above link does not document the optional MASK argument. Could somebody fix this, please?
Thanks for the comment.

Findloc's mask argument is documented in the text ("If @var{MASK} is 
present, only the elements for which @var{MASK} is @code{.TRUE.} are 
considered.") – but missing from the argument table. Thus, the attached 
patch should be sufficient, shouldn't it?

I intent commit it as obvious, unless there are comments.

Tobias


[-- Attachment #2: findloc.diff --]
[-- Type: text/x-patch, Size: 848 bytes --]

Fortran: intrinsic.texi add missing arg to FINDLOC

gcc/fortran/ChangeLog:

	* intrinsic.texi (FINDLOC): Add 'MASK' to argument table.

diff --git a/gcc/fortran/intrinsic.texi b/gcc/fortran/intrinsic.texi
index 63416bce7fd..4a5172a835c 100644
--- a/gcc/fortran/intrinsic.texi
+++ b/gcc/fortran/intrinsic.texi
@@ -6188,6 +6188,8 @@ conformance with @var{ARRAY}.
 @item @var{DIM} @tab (Optional) Shall be a scalar of type
 @code{INTEGER}, with a value between one and the rank of @var{ARRAY},
 inclusive.  It may not be an optional dummy argument.
+@item @var{MASK} @tab (Optional) Shall be an array of type @code{LOGICAL},
+and conformable with @var{ARRAY}.
 @item @var{KIND} @tab (Optional) An @code{INTEGER} initialization
 expression indicating the kind parameter of the result.
 @item @var{BACK} @tab (Optional) A scalar of type @code{LOGICAL}.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Patch] Fortran: intrinsic.texi add missing arg to FINDLOC (was: FINDLOC documentation at https://gcc.gnu.org/onlinedocs/gfortran/FINDLOC.html)
  2021-02-09 21:18 ` [Patch] Fortran: intrinsic.texi add missing arg to FINDLOC (was: FINDLOC documentation at https://gcc.gnu.org/onlinedocs/gfortran/FINDLOC.html) Tobias Burnus
@ 2021-02-09 21:54   ` Thomas Koenig
  2021-02-09 22:13     ` Tobias Burnus
  0 siblings, 1 reply; 4+ messages in thread
From: Thomas Koenig @ 2021-02-09 21:54 UTC (permalink / raw)
  To: Tobias Burnus, Kay Diederichs, fortran, gcc-patches

Hi Tobias,

> I intent commit it as obvious, unless there are comments.

Just one nit: MASK does not have to be an array, it can
also be a scalar. It just has to be conformable.

OK with that change.

Best regards

	Thomas



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Patch] Fortran: intrinsic.texi add missing arg to FINDLOC (was: FINDLOC documentation at https://gcc.gnu.org/onlinedocs/gfortran/FINDLOC.html)
  2021-02-09 21:54   ` Thomas Koenig
@ 2021-02-09 22:13     ` Tobias Burnus
  0 siblings, 0 replies; 4+ messages in thread
From: Tobias Burnus @ 2021-02-09 22:13 UTC (permalink / raw)
  To: Thomas Koenig, Kay Diederichs, fortran, gcc-patches

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

Hi Thomas,

On 09.02.21 22:54, Thomas Koenig via Fortran wrote:
> Just one nit: MASK does not have to be an array, it can
> also be a scalar. It just has to be conformable.

Well spotted. However, that also applies to {MAX,MIN}{LOC,VAL}. Hence, I 
updated those as well.

I will commit the patch tomorrow.

Thanks,

Tobias


[-- Attachment #2: findloc-v2.diff --]
[-- Type: text/x-patch, Size: 2824 bytes --]

Fortran: intrinsic.texi add missing arg to FINDLOC

gcc/fortran/ChangeLog:

	* intrinsic.texi (FINDLOC): Add 'MASK' to argument table.
	(MAXLOC, MAXVAL, MINLOC, MINVAL): For 'MASK', remove 'an
	array' as scalars are also permitted.

diff --git a/gcc/fortran/intrinsic.texi b/gcc/fortran/intrinsic.texi
index 63416bce7fd..ea78f7d343a 100644
--- a/gcc/fortran/intrinsic.texi
+++ b/gcc/fortran/intrinsic.texi
@@ -6188,6 +6188,8 @@ conformance with @var{ARRAY}.
 @item @var{DIM} @tab (Optional) Shall be a scalar of type
 @code{INTEGER}, with a value between one and the rank of @var{ARRAY},
 inclusive.  It may not be an optional dummy argument.
+@item @var{MASK} @tab (Optional) Shall be of type @code{LOGICAL},
+and conformable with @var{ARRAY}.
 @item @var{KIND} @tab (Optional) An @code{INTEGER} initialization
 expression indicating the kind parameter of the result.
 @item @var{BACK} @tab (Optional) A scalar of type @code{LOGICAL}.
@@ -10356,7 +10358,7 @@ Transformational function
 @item @var{DIM}   @tab (Optional) Shall be a scalar of type
 @code{INTEGER}, with a value between one and the rank of @var{ARRAY},
 inclusive.  It may not be an optional dummy argument.
-@item @var{MASK}  @tab Shall be an array of type @code{LOGICAL},
+@item @var{MASK}  @tab Shall be of type @code{LOGICAL},
 and conformable with @var{ARRAY}.
 @item @var{KIND} @tab (Optional) An @code{INTEGER} initialization
 expression indicating the kind parameter of the result.
@@ -10417,7 +10419,7 @@ Transformational function
 @item @var{DIM}   @tab (Optional) Shall be a scalar of type
 @code{INTEGER}, with a value between one and the rank of @var{ARRAY},
 inclusive.  It may not be an optional dummy argument.
-@item @var{MASK}  @tab (Optional) Shall be an array of type @code{LOGICAL},
+@item @var{MASK}  @tab (Optional) Shall be of type @code{LOGICAL},
 and conformable with @var{ARRAY}.
 @end multitable
 
@@ -10723,7 +10725,7 @@ Transformational function
 @item @var{DIM}   @tab (Optional) Shall be a scalar of type
 @code{INTEGER}, with a value between one and the rank of @var{ARRAY},
 inclusive.  It may not be an optional dummy argument.
-@item @var{MASK}  @tab Shall be an array of type @code{LOGICAL},
+@item @var{MASK}  @tab Shall be of type @code{LOGICAL},
 and conformable with @var{ARRAY}.
 @item @var{KIND} @tab (Optional) An @code{INTEGER} initialization
 expression indicating the kind parameter of the result.
@@ -10784,7 +10786,7 @@ Transformational function
 @item @var{DIM}   @tab (Optional) Shall be a scalar of type
 @code{INTEGER}, with a value between one and the rank of @var{ARRAY},
 inclusive.  It may not be an optional dummy argument.
-@item @var{MASK}  @tab Shall be an array of type @code{LOGICAL},
+@item @var{MASK}  @tab Shall be of type @code{LOGICAL},
 and conformable with @var{ARRAY}.
 @end multitable
 

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-02-09 22:13 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-09 20:41 FINDLOC documentation at https://gcc.gnu.org/onlinedocs/gfortran/FINDLOC.html Kay Diederichs
2021-02-09 21:18 ` [Patch] Fortran: intrinsic.texi add missing arg to FINDLOC (was: FINDLOC documentation at https://gcc.gnu.org/onlinedocs/gfortran/FINDLOC.html) Tobias Burnus
2021-02-09 21:54   ` Thomas Koenig
2021-02-09 22:13     ` Tobias Burnus

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).