> 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 > > > > > > > > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Discover CFTicket - The leading ColdFusion Help Desk and Trouble Ticket application http://www.houseoffusion.com/banners/view.cfm?bannerid=48 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:203066 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

