lnNumberToTranslate = 12345
lnDivider = 10
Divide your number to 10 depending how big it is. ( while lnNumberToTranslate > 0 ). After a division MOD(lnNumberToTranslate, 10) you gonna get the remainder. if it's your first division then that remainder it's zecimal and so on. Before you made the next division make lnNumberToTranslate smaller
I. 12345
II. 1234
Or leave him alone and increase the lnDivider (10, 100).
The rest is simple. Two procs with do case structures:
I. case tnParam = 1
return "One"
II. case tnParam = 100
return "Hundred"
Hope this helps !!!
Thanks for sharing your knowlege.