[an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive]
 
[an error occurred while processing this directive] [an error occurred while processing this directive]
Skåne Sjælland Linux User Group - http://www.sslug.dk Home   Subscribe   Mail Archive   Forum   Calendar   Search
MhonArc Date: [Date Prev] [Date Index] [Date Next]   Thread: [Date Prev] [Thread Index] [Date Next]   MhonArc
 

Re: [TEKNIK] Perl - 32/64 bit signed/unsigned beregninger ??



"Brian Ipsen" <sslug@sslug> writes:

> Problemet er, at det tilsyndeladende regner med 32-bit signed værdier....
>
> F.eks. burde jeg få værdien 3357958001 ud for en datafil - men hvis jeg
> checker via BYTESRCVD variablen, så får jeg en negativ værdi ud ???

Nej, den regner godt nok, men i printf betyder %d 'signed integer' og
sådan en fætter er 32 bit. Hvis du *vil* bruge printf så kan du skrive
unsigned 64bit tal ud med '%llu'.

Men hvorfor bruge printf? 'print $sum*300' burde gøre det du vil.

-- 
 Peter Makholm     |                                              What if:
 sslug@sslug |     IBM bought Xenix from Microsoft instead of buying
 http://hacking.dk |                                                  DOS?


 
Home   Subscribe   Mail Archive   Index   Calendar   Search

 
 
Questions about the web-pages to <www_admin>. Last modified 2005-08-10, 22:27 CEST [an error occurred while processing this directive]
This page is maintained by [an error occurred while processing this directive]MHonArc [an error occurred while processing this directive] # [an error occurred while processing this directive] *