* Thus wrote John J Foerch ([EMAIL PROTECTED]):
> Hi,
>     How do I unpack uint32's?  I'm using the format character "L" and
> numbers greater than 2^31 come back as signed integers instead.  This seems
> like a bug.

I suppose it is a bug. It seems that all unsigned unpacks dont
honor this, as the documentation on unpack does note.

I did, however, write a patch that will enable the returning of
unsigned values.  It still needs approval and is currently only for
the cvs version of php:

   http://zirzow.dyndns.org/patches/pack.patch
 
A work around on this is you'll have to use s/printf() to obtain the
correct unsigned value:

  $array = unpack('Llongvalue', -1);
  printf("%lu", $array['longvalue']);



Curt
-- 
If eval() is the answer, you're almost certainly asking the
wrong question. -- Rasmus Lerdorf, BDFL of PHP

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

Reply via email to