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:203028
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=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to