Search & Replace digit

SKaushal

New Member
Hi Everybody,

Problem: I have to change the last digit of a negative number as follows:

if a negative number ends in "0" then change last digit to "}"
if a negative number ends in "1" then change last digit to "K"
and so on..................

Help me out Please.

Thanx
 
You mean like:

def var iValue as int.
def var cValue as char.

if iValue < 0 then /* negative */

cValue = substring(string(iValue), 1, Length(string(iValue) - 1))
+ entry("{kabcd ...", index("012345 ..",
substring(string(iValue), Length(string(iValue)), 1)).

note: I always forget if entry is entry(list, num) or (num, list)
so check.
 
Back
Top