| ! Ordinal An Inform 5.5 library extention by L. Ross Raszewski | |
| ! Prints an ordinal number (First, Second, etc.) | |
| !Have your code call "OrdinalNum(#)" to print out | |
| !Much thanks to Graham Nelson, for EnglishNum(), on which this is based | |
| !INCLUDE it after Grammar, but before anything that uses it. | |
| [ OrdinalNum n f; | |
| if (n==0) "zeroth"; | |
| if (n>=100) { EnglishNumber(n-(n%100)); f=1;} | |
| n=n%100; if (f==1 && n~=0) print " "; f=0; | |
| if (n>20 && (n%10)~=0) { EnglishNumber(n-(n%10)); n=n%10; f=1;} | |
| if (f==1) print "-"; | |
| if (n==0) print "th"; | |
| if (n==90) print "nintieth"; | |
| if (n==80) print "eightieth"; | |
| if (n==70) print "seventieth"; | |
| if (n==60) print "sixtieth"; | |
| if (n==50) print "fiftieth"; | |
| if (n==40) print "fortieth"; | |
| if (n==30) print "thirtieth"; | |
| if (n==20) print "twentieth"; | |
| if (n==19) print "ninteenth"; | |
| if (n==18) print "eighteenth"; | |
| if (n==17) print "seventeenth"; | |
| if (n==16) print "sixteenth"; | |
| if (n==15) print "fifteenth"; | |
| if (n==14) print "fourteenth"; | |
| if (n==13) print "thirteenth"; | |
| if (n==12) print "twelfth"; | |
| if (n==11) print "eleventh"; | |
| if (n==10) print "tenth"; | |
| if (n==9) print "ninth"; | |
| if (n==8) print "eigth"; | |
| if (n==7) print "seventh"; | |
| if (n==6) print "sixth"; | |
| if (n==5) print "fifth"; | |
| if (n==4) print "fourth"; | |
| if (n==3) print "third"; | |
| if (n==2) print "second"; | |
| if (n==1) print "first"; | |
| ]; | |
Xet Storage Details
- Size:
- 1.61 kB
- Xet hash:
- d2bb556f759eafb5365dde7186e7c64f139b3ef07418203c68fb24de8691954c
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.