It should, but you'll probably actually have to add the desc attribute at
the end of my suggestion.

- Calvin

-----Original Message-----
From: Rick Faircloth [mailto:[EMAIL PROTECTED] 
Sent: Friday, April 15, 2005 11:08 AM
To: CF-Talk
Subject: RE: Max value of 3 variables

> Or #arrayMax(listToArray(numbers))#

> For flexibility, how about this: ListFirst(ListSort(numbers,'numeric'))

And how, exactly, would these assist in obtaining
the top value of 3 numbers?

Does "arrayMax" put the maximum value first in the array?

I guess "ListFirst(ListSort(..." would put the maximum value first in the
list?

Rick


> -----Original Message-----
> From: Paul [mailto:[EMAIL PROTECTED]
> Sent: Friday, April 15, 2005 10:44 AM
> To: CF-Talk
> Subject: RE: Max value of 3 variables
>
>
> Or #arrayMax(listToArray(numbers))#
>
> -----Original Message-----
> From: Calvin Ward [mailto:[EMAIL PROTECTED]
> Sent: Friday, April 15, 2005 7:18 AM
> To: CF-Talk
> Subject: RE: Max value of 3 variables
>
> For flexibility, how about this: ListFirst(ListSort(numbers,'numeric'))
>
> -Calvin
>
> -----Original Message-----
> From: Ewok [mailto:[EMAIL PROTECTED]
> Sent: Friday, April 15, 2005 9:10 AM
> To: CF-Talk
> Subject: RE: Max value of 3 variables
>
> Max() should do it if you're not going to eventually have more values.
>
> Think it can only take 2 values so nest them like max(max(no1, no2), no3)
>
> If its going to be more... just loop them, if the currnent value is larger
> than the previous, set it to the max...
>
> <cfset max = 0 >
>
> <cfloop list="#numbers#" index="i">
>   <cfif i gt max>
>     <cfset max = i>
>   </cfif>
> </cfloop>
>
> -----Original Message-----
> From: G [mailto:[EMAIL PROTECTED]
> Sent: Friday, April 15, 2005 8:58 AM
> To: CF-Talk
> Subject: Max value of 3 variables
>
> Got three variables passed into me, all are decimal values. What is the
> quickest and most elegant way of determining which of the variables holds
> the largest value?
>
> TIA,
>
> BG
>
>
>
>
>
>
>
>
> 



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Logware (www.logware.us): a new and convenient web-based time tracking 
application. Start tracking and documenting hours spent on a project or with a 
client with Logware today. Try it for free with a 15 day trial account.
http://www.houseoffusion.com/banners/view.cfm?bannerid=67

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:203068
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to