J3/04-113 Date: 08 Dec. 2003 To: J3 From: Dan Nagle Subject: FINDLOC (a/k/a FIRSTLOC/LASTLOC) While formating 03-269r1 item 3 as an N1496 paper, I'd like to change the syntax a bit. I propose that a FINDLOC intrinsic with a BACK= argument be pursued instead of separate FIRSTLOC and LASTLOC intrinsics. Number: Title: FINDLOC Submitted By: J3 Status: For Consideration References: 03-106, Public Comment by Jean Vizena Basic Functionality: Intrinsic returns location of first true, starting from the first or last element of an array. Rationale: Considered in response to a public comment, this formulation is modeled after the character search routines index, scan, and verify. A BACK= is used to distinguish forward and backward searches, this may result is coding convience or in more compact code. Estimated Impact: This is yet another search routine along the lines of minloc/maxloc. Detailed Specification: FINDLOC( mask [, BACK= s-l-e]) Returns the indices of the first true, starting with the first element of mask. If BACK= is present and the s-l-e evaluates to true, returns the index of the first true element starting with the last element and searching backwards. For symmetry, it may be desirable to add a BACK= to MAXLOC and MINLOC, however, this paper does not porpose to do so. History: