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

change variable from negative to postive

Former Member
0 Likes
446

hallow

i wont top now how i change variable from negative to postive

like change -5 to 5

thankes

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
427

Hi,

do this:

if value < 0.

value = value * ( -1 ).

endif.

Regards, Dieter

3 REPLIES 3
Read only

Former Member
0 Likes
428

Hi,

do this:

if value < 0.

value = value * ( -1 ).

endif.

Regards, Dieter

Read only

Former Member
0 Likes
427

if l_var lt 0.

l_var = l_var * -1.

endif.

Read only

Former Member
0 Likes
427

Hi Shnya,

You just multiply with " -1", it wil get converted from Positive to negative or vice versa.

Hope I answered your query.

Regards,

Sujatha