alias -l r return return alias -l n { if ($1 == 1) $r One if ($1 == 2) $r Two if ($1 == 3) $r Three if ($1 == 4) $r Four if ($1 == 5) $r Five if ($1 == 6) $r Six if ($1 == 7) $r Seven if ($1 == 8) $r Eight if ($1 == 9) $r Nine if ($1 == 10) $r Ten if ($1 == 11) $r Eleven if ($1 == 12) $r Twelve if ($1 == 13) $r Thirteen if ($1 == 14) $r Fourteen if ($1 == 15) $r Fifteen if ($1 == 16) $r Sixteen if ($1 == 17) $r Seventeen if ($1 == 18) $r Eighteen if ($1 == 19) $r Nineteen if ($1 == 20) $r Twenty if ($1 == 30) $r Thirty if ($1 == 40) $r Forty if ($1 == 50) $r Fifty if ($1 == 60) $r Sixty if ($1 == 70) $r Seventy if ($1 == 80) $r Eighty if ($1 == 90) $r Ninety if ($1 == h) $r Hundred if ($1 == t) $r Thousand if ($1 == m) $r Milion if ($1 == b) $r Billion if ($1 == a) $r Trillion if ($1 == c) $r Quadrillion if ($1 == d) $r Quintillion if ($1 == e) $r Sextillion if ($1 == f) $r Septillion if ($1 == g) $r Octillion if ($1 == v) $r Nonillion if ($1 == i) $r Decillion if ($1 == j) $r Undecillion if ($1 == k) $r Duodecillion if ($1 == l) $r Tredecillion if ($1 == n) $r Quattuordecillion if ($1 == o) $r Quindecillion if ($1 == p) $r Sexdecillion if ($1 == q) $r Septendecillion if ($1 == r) $r Octodecillion if ($1 == s) $r Novemdecillion if ($1 == u) $r Vigintillion } alias -l t if ($1 > 19) { $r $n($calc($left($1,1) * 10)) $+ $iif($right($1,1) > 0,- $+ $n($right($1,1))) } | else $r $n($1) alias -l n3 $r $n4($1) $n($replace($2,10,v,11,i,12,j,13,k,14,l,15,n,16,o,17,p,18,q,19,r,20,s,21,u,1,t,2,m,3,b,4,a,5,c,6,d,7,e,8,f,9,g)) alias numconv { if ($len($1-) == 1 && $1 == 0 || .* iswm $1-) { return Zero } var %n = 1 var %t = "" var %s = $s($1-) while ($gettok(%s,0,32) >= %n) { %t = %t $n3($gettok(%s,%n,32),$calc($gettok(%s,0,32) - (%n))) if ($gettok(%s,%n,32) !isnum && - isin $gettok(%s,%n,32)) $r invalid inc %n } $r %t } alias -l s { var %n = 0 var %t = "" var %s = $remove($1-,$chr(32)) if (. isin %s) %s = $remove($left(%s,$pos(%s,.,1)),.) while (%n < $len(%s)) { if (. !isin $calc(%n / 3)) %t = $mid(%s,$calc($len(%s) - %n),1) %t else %t = $mid(%s,$calc($len(%s) - %n),1) $+ %t inc %n } $r %t } alias -l n4 { if ($len($1) > 2) { var %t = "" var %num = 1 if ($mid($1,1,1) == 0) { while ($mid($1,%num,1) == 0 && %num <= $len($1)) { inc %num } %t = $mid($1,%num,$len($1)) $r $t(%t) } $r $n($mid($1,1,1)) $n(h) $t($right($1,2-)) } else $r $t($1) } alias test { var %num = 1 write -c num.txt while (%num <= $1) { write num.txt %num : ( $+ $numconv(%num) $+ ) inc %num } }