well, that would depend on how the comparison function
which you write works.  A comparison function is passed
two (locked) record pointers (and other junk) and returns
a signed integer.  A positive return value indicates the
first record is larger, A zero return value indicates
equality, and a negative return value that the first record
is smaller -- in the opinion of that comparison function.

Note that, additionally, you use the same comparison
function with DmQuickSort or DmInsertionSort to keep the
database sorted in your particular style (as DmFindSortPosition
needs the database to be sorted).

-bob mckenzie

-----Original Message-----
From: Rhoda BEROL [mailto:[EMAIL PROTECTED]]
Sent: Thursday, July 12, 2001 9:16 AM
To: Palm Developer Forum
Subject: Re: search function


For example, If I search record which contains the value "Ber", does this
function retrieve this record "bertrand", "albert" ...?

----- Original Message -----
From: "Robert McKenzie" <[EMAIL PROTECTED]>
To: "Palm Developer Forum" <[EMAIL PROTECTED]>
Sent: Thursday, July 12, 2001 5:56 PM
Subject: RE: search function


> yes.  Create a comparison function and use DmFindSortPosition,
> which uses a binary search.  Read the docs!!
>
> -bob mckenzie
>
> -----Original Message-----
> From: Rhoda BEROL [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, July 12, 2001 8:46 AM
> To: Palm Developer Forum
> Subject: search function
>
>
> I want to create a search function. The user will be able to search record
> with criterion.
> An example: search people who live in Paris.
>
> Is it possible ?
> And how can I do it?
>
> Thanks
> Rhoda
>
> --
> For information on using the Palm Developer Forums, or to unsubscribe,
> please see http://www.palmos.com/dev/tech/support/forums/
>
> --
> For information on using the Palm Developer Forums, or to unsubscribe,
please see http://www.palmos.com/dev/tech/support/forums/
>

-- 
For information on using the Palm Developer Forums, or to unsubscribe,
please see http://www.palmos.com/dev/tech/support/forums/

-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/tech/support/forums/

Reply via email to