Charles Greathouse on Fri, 21 Jun 2013 17:20:21 +0200


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: setsearch flags


I would love to have flags for vecsearch. I suggest:
flag 0: return 0 if missing, or the index if found
flag 1: return the insertion index if missing, or 0 if found
flag 2: return the insertion index if missing, or the index if found

Charles Greathouse
Analyst/Programmer
Case Western Reserve University


On Fri, Jun 21, 2013 at 11:14 AM, Bill Allombert <Bill.Allombert@math.u-bordeaux1.fr> wrote:
On Fri, Jun 21, 2013 at 09:04:46AM -0400, Charles Greathouse wrote:
> vecsearch doesn't work at all here, since it returns 0 if the element is
> missing. I'm looking for something giving the position the element would
> occupy.

Then it is vecsearch which needs a flag similar to setsearch.

Cheers,
Bill.