> ----- Original Message -----
> From: "Rhoda BEROL" <[EMAIL PROTECTED]>
> > What is the name of the fonction which return the minimum between 2
> numbers
> > (version SDK 4.0)?
>
> It's called:
>
> #define MIN(x,y) ((x)<(y)?(x):(y))

Just be warned that you should only use static values with this macro.
For instance, MIN(x, somefunction()) would be a bad idea - because if
somefunction() is lower it would be called twice! And if you had
min(x++, y++) then the smallest value would increase by two.

If you want to avoid this then you can't use a macro... you'll need a
function.

--
Andrew Francis
[EMAIL PROTECTED]




-- 
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