I really have read it......
Change rank into a string and append the string with a case, or if statement:
if myvar =3 then myvar=myvar+"rd"
or Select case myvar;
myvar = myvar + "st"
Have fun! You gave us no details regarding what protocol, or languge. Take the example and run with it, as we are not going to change our answer based on NEW DETAILS!
Either you understand , or you don't! Either you can or you can't!
"There is no try, only do!"