Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Char increment in a String

Former Member
0 Likes
668

Hi,

Is it possible to increment each character in a string by some value.

DATA: C(10) TYPE C VALUE 'MAHES'.

Here i would like to transform and display the string like:

M + 2 = O

A + 2 = C

H + 2 = J

E + 2 = G

S + 2 = U

Pl. give me some inputs.

with best regards

Mahesh

4 REPLIES 4
Read only

Former Member
0 Likes
490

not possiable

Read only

0 Likes
490

Hi,

it is possible if you take the ascii values of these letters and add numbers then convert the number to ascii calue.

Read only

Former Member
0 Likes
490

hi,

one way to achieve ur task is to assign values to a=1,b=2,c=3,..............................z=26.

and perform ur operations.

declare all variables as character data type.

REWARD ALL USEFUL ANSWERS.

with regards,

Suresh Aluri.

Read only

Former Member
0 Likes
490

try to find some FM to convet ASCII

Message was edited by:

jbpdubey