View Single Post
Chdata
Veteran Member
Join Date: Aug 2012
Location: Computer Chair, Illinois
Old 02-19-2017 , 15:04   Re: [ANY] Singular and Plural
Reply With Quote #4

Code:
//  Evaluates to a string of the ordinal suffix of a number (1st, 2nd, 3rd, etc)
#define NatSuf(%1)               ((%1 + 9) % 10 >= 3 || (%1 + 89) % 100 < 3 ? "th" : (%1 % 10) == 1 ? "st" : (%1 % 10) == 2 ? "nd" : "rd")
__________________

Last edited by Chdata; 02-19-2017 at 15:04.
Chdata is offline