comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: Searching in a sorted array
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: Searching in a sorted array [message #15129] Sun, 25 April 1999 00:00
Liam Gumley is currently offline  Liam Gumley
Messages: 473
Registered: November 1994
Senior Member
Tri VU KHAC <tvk@info.fundp.ac.be> wrote in message
news:3721B868.BE541BA3@info.fundp.ac.be...
> Hi folks,
>
> subject : Searching an element replying to a criteria in an unique &
> sorted array
>
> I think every programmer can make an efficient Finder function replying
> to this request.
> For example: Looking for the last element smaller than or equal 100 in a
> sorted array.

How about this:

loc = where( array le 100, count )
if count ge 0 then lastval = loc( count - 1 )
help, lastval

Cheers,
Liam.
[Message index]
 
Read Message
Previous Topic: Re: Reading DXF?
Next Topic: Re: Multiple widgetized windows in one application

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 18:27:06 PDT 2025

Total time taken to generate the page: 0.00489 seconds