stripping negative number

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I want to convert negative number to its positive equivalent.

$num = -40;
printf("Unsigned value is %u", $num);

output is: Unsigned value is 4294967256

I have checked the manpages and %u seems the right format. Pls advise.


--
roger


---------------------------------------------------
Sign Up for free Email at http://ureg.home.net.my/
---------------------------------------------------

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux