RE: Re[2]: [PHP] unexpected results using sprintf() with %u
| From: | Cody Phanekham | Date: | Fri, 03 Oct 2003 06:39:32 +0000 |
| Subject: | RE: Re[2]: [PHP] unexpected results using sprintf() with %u | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-164862@lists.php.net to get a copy of this message | ||
Yeah abs() looks like it would do the trick
I wonder if the same output would be generated using C's sprintf()
Too bad i dont have access to C... oh well
> -----Original Message-----
> From: Tom Rogers [mailto:trogers@kwikin.com]
> Sent: Friday, 3 October 2003 16:27
> To: Tom Rogers
> Cc: Cody Phanekham; php-general@lists.php.net
> Subject: Re[2]: [PHP] unexpected results using sprintf() with %u
>
>
> Hi,
>
> TR> -86 actually looks like FFFFFFAA which if you then look
> at unsigned is pretty
> TR> big :)
>
> TR> --
> TR> regards,
> TR> Tom
>
> Maybe what you need is the abs() function which ignores the
> sign of a number
>
> --
> regards,
> Tom
>
>
>
*************************************************************************************
This e-mail, including any attachments to it, may contain confidential and/or personal information.
If you have received this e-mail in error, you must not copy, distribute, or disclose it, use or
take any action
based on the information contained within it.
Please notify the sender immediately by return e-mail of the error and then delete the original
e-mail.
The information contained within this e-mail may be solely the opinion of the sender and may not
necessarily
reflect the position, beliefs or opinions of Salmat on any issue.
This email has been swept for the presence of computer viruses known to Salmat's anti-virus
systems.
For more information, visit our website at www.salmat.com.au.
*************************************************************************************