Re: Ordinal Numbers (1st, 2nd, etc.)
Re: Ordinal Numbers (1st, 2nd, etc.)
- Subject: Re: Ordinal Numbers (1st, 2nd, etc.)
- From: Jason Bourque <email@hidden>
- Date: Thu, 16 Aug 2001 18:29:50 -0400
On 8/16/01 6:21 PM, "Greg Back" <email@hidden> wrote:
>
Hi all
>
>
Does anyone know of a way to change integers (1, 2, 3) to ordinal numbers
>
(1st, 2nd, 3rd)?? I know you can set of equivalent lists and match them up,
>
but is there an easier way??
>
>
TIA,
>
Greg
on addNumericSuffix(thisNum)
set the listIndex to (thisNum mod 10) + 1
set the numSuffix to item listIndex of ,
{"th", "st", "nd", "rd", "th", "th", "th", "th", "th", "th"}
return ((thisNum as text) & the numSuffix)
end addNumericSuffix
--my addNumericSuffix(109)
Jason Bourque
Scripting 24/7