$ord

From Scriptwiki
Revision as of 20:54, 11 May 2008 by Aca20031 (talk | contribs) (typo)

Jump to: navigation, search

Returns the orderly version of the given number (Appends either st, nd, rd or th)

$ord(N)
  • N can be any number. Even negative.

Example

alias example { var %suzy = 4, %carol = 3, %john = 2, %aca = 1 | echo -atg Suzy was $ord(%suzy) and Carol $&
 was $ord(%carol) and John was $ord(%john) but aca20031 was $ord(%aca) $+ ! }