alias numconv { %c = %r = return %n = 23 %e = $remove($gettok($1,1,32),$chr(44)) if %e != . && 0 $+ %e isnum 0- $str(9,66) { %m = $gettok(0 $+ %e,1,46) while %m { dec %n if ($a($right(%m,3))) %c = $ifmatch $gettok(vigint@novem!octo!sept.!sex!quin!quattuor!tre!duo!un!!non@oct@sept@sext@quint@quadr@tr@b@m@thousand,%n,8) %c %m = $left(%m,-3) } %r $iif(%c,$replace(%c,3,thir,4,four,5,fif,6,six,7,sev.,8,eigh,9,nine,^,te.,!,dec@,@,illion,.,en),$iif(%e < 1,zero)) } %r invalid } alias a if ($1 > 0) %r $iif($1 < 20,$gettok(onetwothree4five678t9t.elev.twelve3^4^5^6^7^8^9^,$1,8),$iif($1 < 100,$+($gettok(0tw.3for56789,$left($1,-1),8),ty,$iif($b($mid($1,-1)),- $+ $ifmatch)),$b($left($1,1)) hundred $b($mid($1,2)))) alias b %r $a($1)