Counting
#1

Hi, my function return's -1 instead of 1..
Does there exist an substring function or another calculation to change it to the positive count?
Reply
#2

floatabs()

Or simply 0-value (0 - -5 would be 5).
Reply
#3

Quote:
Originally Posted by MP2
Посмотреть сообщение
floatabs()
Код:
id = floatabs(mysql_fetch_int());
This returns an tag mismatch.
Reply
#4

FLOATabs takes a FLOAT. There is no integer version. You'll have to use float() and floatround(). Just use 0 - value.
Reply
#5

pawn Код:
id = mysql_fetch_int();
if (id < 0) id *= -1;
Reply
#6

Thankyou!, it worked.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)