64 Bit integer display

Discussion in 'Perl Misc' started by Deepu, Mar 20, 2008.

  1. Deepu

    Deepu Guest

    Hi All,

    Can somebody give some ideas on how to display 64bit integer.

    I tried,

    #!/usr/bin/perl -w

    use bigint;

    $test = 0x123456789abcdef;

    print "$test \n";

    But when i run:

    Hexadecimal number > 0xffffffff not portable

    Thanks!
    Deepu, Mar 20, 2008
    #1
    1. Advertising

  2. Deepu <> writes:

    > Hexadecimal number > 0xffffffff not portable


    is that really the error you get? it works for every perl I've got on
    linux that has bigint. (in my case, perls 5.8.5 ... 5.10 ) and I can't
    find ANY reference to that error using google.

    --
    Joost Diepenmaat | blog: http://joost.zeekat.nl/ | work: http://zeekat.nl/
    Joost Diepenmaat, Mar 20, 2008
    #2
    1. Advertising

  3. Deepu

    Ben Morrow Guest

    Quoth Deepu <>:
    >
    > I tried,
    >
    > #!/usr/bin/perl -w
    >
    > use bigint;
    >
    > $test = 0x123456789abcdef;
    >
    > print "$test \n";
    >
    > But when i run:
    >
    > Hexadecimal number > 0xffffffff not portable


    perldiag tells you this warning is in the 'portable' category. Since the
    only warnings in this category are about integers greater than 2**32-1,
    which you aren't interested in, simply turn them off:

    use warnings;
    use strict;

    no warnings 'portable';
    use bigint;

    print 0x123456789abcdef;

    At least on my perl (i386-freebsd-64int), I don't need 'bigint', since
    despite being built for a 32-bit processor it can still use 64-bit
    integers.

    Ben
    Ben Morrow, Mar 20, 2008
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Replies:
    3
    Views:
    1,715
    Timothy Bendfelt
    Jan 19, 2007
  2. Imayam

    How to use 64 bit integer in 16 Bit Dos ?

    Imayam, Jun 15, 2006, in forum: C Programming
    Replies:
    3
    Views:
    398
    Mark McIntyre
    Jun 15, 2006
  3. Replies:
    9
    Views:
    938
    Juha Nieminen
    Aug 22, 2007
  4. xyz
    Replies:
    2
    Views:
    804
  5. Jeff.M
    Replies:
    6
    Views:
    162
    Lasse Reichstein Nielsen
    May 4, 2009
Loading...

Share This Page