Hi all, I'd like to know how others write a function like this.
TIA Hershel

function fNumericToMoney
  put param(1) into tParam
  if tParam contains "." then
    put offSet(".",tParam)-1 into tTs
    put 3 into tC
  else
    put the number of chars in tParam into tTs
    put 0 into tC
  end if
  repeat while tTs >3
    add 3 tC
    put "," before char -tC in tParam
    add 1 to tC
    subtract 3 from tTs
  end repeat
  return "$" & tParam
end fNumericToMoney

_______________________________________________
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution

Reply via email to