idlastro / Miscellaneous (Non-Astronomy) Procedures: ORDINAL

[Source code]

NAME
ORDINAL
PURPOSE
Convert an integer to a correct English ordinal string:
EXPLANATION
The first four ordinal strings are "1st", "2nd", "3rd", "4th" ....
CALLING SEQUENCE
result = ordinal( num )
INPUT PARAMETERS
num = number to be made an ordinal.  If float, will be FIXed.
OUTPUT PARAMETERS
result = string such as '1st' '3rd' '164th' '87th', etc.
MODIFICATION HISTORY
Written by R. S. Hill, STX, 8 Aug. 1991
Converted to IDL V5.0   W. Landsman   September 1997