alias NumConv { if ($1 != $null) { var %w = $chr(32),%f = $gettok($1-,1,%w),%i = $gettok($remove(%f,$chr(44),%w),1,46),%r if (%i !isnum) || (%i < 0) || (+ isin %i) || (- isin %i) || ($count($1,.) > 1) return Invalid if (!%i) || ($int($1) == 0) return zero while (3 \\ $len(%i)) { %i = 0 $+ %i } var %h = $len(%i) while (%h) { var %t = $left(%i,3),%a = $e($left(%t,1)),%b,%c,%d,%e,%v = $mid(%t,2,1),%q = $iif(%v,$gettok('#twen!-#thir!-#>!-#fif!-#six!-#=!-#_!-#.!-,%v,35)) if ($left(%t,1)) %b = hundred if (%v = 1) %c = $gettok(ten#eleven#twelve#thir@#>@#fif@#six@#=@#_@#.@,$calc($mid(%t,-1) +1),35) else { %d = $e($mid(%t,-1)) %c = $iif(!%d,$left(%q,-1),%q) } if (%t > 0) && ($calc(%h /3-1)) %e = $gettok(hundred#thousand#m£#b£#tr£#quadr£#quint£#sext£#sept£#oct£#non£#~#un~#duo~#tre~#quattuor~#quin~#sex~#septen~#octo~#novem~#vigint£,$calc($ifmatch +1),35) %r = $replace(%r $+(%a,%w,%b,%w,%c,%w,%d,%w,%e),',$(),~,^£,!,ty,=,seven,.,nine,>,four,_,eigh,@,teen,£,illion,^,dec,- $+ %w,-) %i = $mid(%i,4) dec %h 3 } return %r } } alias e if ($1) return $gettok(one#two#three#>#five#six#=#_t#.,$1,35)