One approach might be to convert the list to an array and use arrayMax/arrayMin. Assuming the list contains valid numbers, of course.
Thanks for the reply.
Ok, so my next question would be... how do i convert that list to an array?
Excuse my ignorance. Im quite new to it!
Use the very well named ListToArray() function .. and definitely bookmark the online documentation ;-) The functions by category view is invaluable.
<cfset sortedList = listSort(thelist, "numeric", "Asc")>
If you take this approach (which is a fine one), don't forget to build error-tolerance into the process, by means of the <cftry> and <cfcatch> tags.
It is reasonable to assume that, from time to time, this routine may be handed un-processable inputs, which will result in various kinds of exceptions being "thrown." Your application, however, should not "fall flat on its face" when this occurs. Instead, it should "catch" them and respond to the situation in some intelligent way.
This is, by the way, a perfectly-appropriate validation technique for cases like this. You know that "ka-ka might occur," whether it is highly-likely or not-at-all. Instead of spending gobs of computing-cycles checking every single input against "what might go wrong," you simply post someone in the outfield with a big glove. He might spend weeks with nothing to do, but each and every time "ka-ka occurs," he will catch the ball.
Quite philosophical for French readers.