num_as_ordinal function

Convert a number into an ordinal character sequence.