Difference between revisions of "$ord"
From Scriptwiki
m |
|||
(2 intermediate revisions by the same user not shown) | |||
Line 3: | Line 3: | ||
$ord(N) | $ord(N) | ||
− | * N can be any number. | + | * N can be any number. Even negative. |
==Example== | ==Example== | ||
[[alias]] example { [[var]] %suzy = 4, %carol = 3, %john = 2, %aca = 1 | [[echo]] -atg Suzy was $ord(%suzy) and Carol [[$&]] | [[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 [[:User:aca20031|aca20031]] was $ord(%aca) $+ ! } | + | was $ord(%carol) and John was $ord(%john) but [[:User:aca20031|aca20031]] was $ord(%aca) [[DollarPlus|$+]] ! } |
+ | |||
+ | [[Category:Text and Number Identifiers]] |
Latest revision as of 01:53, 8 August 2008
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) $+ ! }