From jwagener@amoco.com Mon Apr  3 03:53:27 1995
Received: from interlock.amoco.com by dkuug.dk with SMTP id AA13801
  (5.65c8/IDA-1.4.4j for <sc22wg5@dkuug.dk>); Mon, 3 Apr 1995 15:54:34 +0200
Received: by interlock.amoco.com id AA07238
  (InterLock SMTP Gateway 3.0 for sc22wg5@dkuug.dk);
  Mon, 3 Apr 1995 08:53:53 -0500
Message-Id: <199504031353.AA07238@interlock.amoco.com>
Received: by interlock.amoco.com (Protected-side Proxy Mail Agent-3);
  Mon, 3 Apr 1995 08:53:53 -0500
Received: by interlock.amoco.com (Protected-side Proxy Mail Agent-2);
  Mon, 3 Apr 1995 08:53:53 -0500
Received: by interlock.amoco.com (Protected-side Proxy Mail Agent-1);
  Mon, 3 Apr 1995 08:53:53 -0500
From: jwagener@amoco.com
X-Openmail-Hops: 1
Date: Mon, 3 Apr 95 08:53:27 -0500
Subject: Henry's latest
To: sc22wg5@dkuug.dk
X-Charset: ASCII
X-Char-Esc: 29

Item Subject: Message text

I haven't scrutinized this yet to see if it might affect the 007, 
but thought I'd pass it along anyway.

Jerry

.......................................................................

FROM: schreibr/unix_in////////HPMEXT1/schreibr#a#riacs#f#edu@houeosm4
TO: hpff-interpret@cs.rice.edu,
    zongaro@vnet.ibm.com

.......................................................................

Received: from hou.amoco.com (earth) by houeosm4 with SMTP
	(1.37.109.15/16.2) id AA094204649; Fri, 31 Mar 1995 18:04:09 -0600
Received: from netserv2 by hou.amoco.com (4.1/SMI-4.1)
	id AA01551; Fri, 31 Mar 95 18:03:49 CST
Received: from interlock.amoco.com (portal.trc.amoco.com) by netserv2 (4.1/SMI-4.0)
	id AA26148; Fri, 31 Mar 95 18:04:32 CST
Received: from cs.rice.edu by portal.amoco.com with SMTP id AA05485
  (InterLock SMTP Gateway 3.0 for <jwagener@amoco.com>);
  Fri, 31 Mar 1995 18:04:00 -0600
Received: from icarus.riacs.edu by cs.rice.edu (RAA11573); Fri, 31 Mar 1995 17:48:33 -0600
Received: from frey.riacs.edu by icarus.riacs.edu (8.6.8/2.7G)
	   id PAA19223; Fri, 31 Mar 1995 15:47:17 -0800
Received: by frey.riacs.edu (8.6.8/2.0N)
	   id PAA06161; Fri, 31 Mar 1995 15:48:51 -0800
Message-Id: <199503312348.PAA06161@frey.riacs.edu>
Date: Fri, 31 Mar 1995 15:48:51 -0800
From: Rob Schreiber <schreibr@riacs.edu>
To: hpff-interpret@cs.rice.edu, zongaro@vnet.ibm.com
Subject: Henry's latest 

.......................................................................


	1)  He withdrew this one.   Whew!

	2)  No comment.

	3)  See (2).

	4) There appears to be a serious problem in the definitions of MAXLOC and
	MINLOC.  According to page 104, lines 17-25, the result of

	                  MAXLOC(ARRAY, DIM[, MASK])

	is a scalar if ARRAY has rank one.  If the rank of ARRAY is greater than one,
	the value of element (s , . . ., s     , s   , . . ., s ) of the result is
	                       1          DIM-1   DIM          n
	equal to

	         MAXLOC(ARRAY(s , . . ., s     , :, s   , . . ., s ),
	                       1          DIM-1      DIM          n
	                [MASK(s , . . ., s     , :, s   , . . ., s )]),
	                       1          DIM-1      DIM          n

	where n is the rank of ARRAY.  Unfortunately, I believe the value of this is a
	rank one array whose size is equal to the rank of the first argument - how can
	the value of an *element* of the result of MAXLOC be an array?

	     The problem isn't immediately apparent when you look at
	the examples on lines 33-37, because in the two-dimensional
	case, each element of the result (according to the text) will
	be a rank one array of only one element - still    invalid, but
	not obviously so.


Yes, I think the standard is wrong here.   Does this correct things?


   Case (iii):   If ARRAY has rank one, the result of MAXLOC(ARRAY, DIM [,MASK]) is a
                 scalar S such that ARRAY(S + LBOUND(ARRAY,1)) corresponds to a true element of
                 MASK (if MASK is present) and has the maximum value of all such elements (all
                 elements if MASK is absent).   It is the smallest such subscript.  Otherwise,
                 the value of element (s , . . ., s     , s   , . . ., s ) of the result is
                                        1          DIM-1   DIM          n
                 equal to

! note change !  MAXLOC(ARRAY(s , . . ., s     , :, s   , . . ., s ), DIM = 1,
                               1          DIM-1      DIM          n   --------   <-- this is new!
                        [MASK(s , . . ., s     , :, s   , . . ., s )]),
                               1          DIM-1      DIM          n

                 where n is the rank of ARRAY.



The argument in the illustrative call to MAXLOC has rank one, 
so with the DIM argument MAXLOC returns a scalar, which
indeed *can* be equal to the given element of the result array.

Rob

