Posts: 515
Threads: 76
Joined: May 2008
Reputation:
0
How -5555 change to 5555 ?
Posts: 515
Threads: 76
Joined: May 2008
Reputation:
0
I need to change any number that is negative variable (< 0) to its positive variable (> 0), remove - from variable if it has it.
Damn, example:
new a = -number;
new b;
How to make b = +number ?
Posts: 365
Threads: 7
Joined: Sep 2007
Reputation:
0
i think it's possible with strdel, just delete the "-" from the number.
Posts: 1,293
Threads: 6
Joined: Jul 2008
Reputation:
0
I don't know what the hell you're doing with all this a/b nonsense, looks like BODMAS disaster in the making.
All you need to do is check if it's below 0, then either times it by -1, or subtract it from 0.
Eg. you have -5555
-5555 x -1 = 5555
0 - ( - 5555) = 5555