AndyJarrett

New UDF- isOddEven

This is just a small UDF that returns if a number is odd or even. Im usuing it in a <tr> tag to get a class from CSS.
<cfscript>
\n /**
\n+ Author : Andy Jarrett
\n+ Email : mail @ andyjarrett . co . uk
\n+ Created : 19/10/2004
\n**/
\n   function isOddEven(num){
\n      var outMsg = "";
\n      
\n      if(NOT isNumeric(num)){
\n         outMsg = "The passed variable was not numeric";
\n      }
\n      else{
\n         if(num MOD 2) outMsg = "odd";
\n         else outMsg = "even";
\n      }
\n      return outMsg;
\n   }
\n<cfscript>