• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Ordinal Numbers (1st, 2nd, etc.)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Ordinal Numbers (1st, 2nd, etc.)


  • Subject: Re: Ordinal Numbers (1st, 2nd, etc.)
  • From: Victor Yee <email@hidden>
  • Date: Fri, 17 Aug 2001 06:19:59 -0400

On Fri, 17 Aug 2001 10:47:27 +0100, Nigel Garvey wrote,

> Just to speed it up a bit:
>
> on addNumericSuffix(thisNum)
> set {tens, units} to {thisNum mod 100 div 10, thisNum mod 10}
> if units is in {1, 2, 3} and tens is not 1 then
> item units of {"st", "nd", "rd"}
> else
> "th"
> end if
> return "" & thisNum & result
> end addNumericSuffix

Amazing! That's twice as fast as any of the others.

So, where do I sign up for that fan club?

:)

Victor


  • Prev by Date: Re: Ordinal Numbers (1st, 2nd, etc.)
  • Next by Date: Re: Basic Question
  • Previous by thread: Re: Ordinal Numbers (1st, 2nd, etc.)
  • Next by thread: Re: Ordinal Numbers (1st, 2nd, etc.)
  • Index(es):
    • Date
    • Thread