long long

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • w3r3w0lf

    long long

    hi!

    can anyone explain this to me?
    long long a;

    what is this "long long"?? something like 8 byte variable (two longs) or
    what?

    thanks


  • Jeff Schwab

    #2
    Re: long long

    w3r3w0lf wrote:[color=blue]
    > hi!
    >
    > can anyone explain this to me?
    > long long a;
    >
    > what is this "long long"?? something like 8 byte variable (two longs) or
    > what?[/color]

    It's usually a sixty-four bit, signed integer type. It's a popular
    extension.

    Comment

    • John Harrison

      #3
      Re: long long


      "Jeff Schwab" <jeffplus@comca st.net> wrote in message
      news:u7idnfH-r7o98Lvd4p2dnA@ comcast.com...[color=blue]
      > w3r3w0lf wrote:[color=green]
      > > hi!
      > >
      > > can anyone explain this to me?
      > > long long a;
      > >
      > > what is this "long long"?? something like 8 byte variable (two longs) or
      > > what?[/color]
      >
      > It's usually a sixty-four bit, signed integer type. It's a popular
      > extension.
      >[/color]

      I believe its part of the C99 standard, so no longer a extension in the C
      world. But ask in comp.lang.c to confirm.

      john


      Comment

      • Ivan Vecerina

        #4
        Re: long long

        "w3r3w0lf" <asff@asdf.asdf > wrote in message
        news:c05q2d$j1r $1@ls219.htnet. hr...[color=blue]
        > can anyone explain this to me?
        > long long a;
        >
        > what is this "long long"?? something like 8 byte variable (two longs) or
        > what?[/color]
        - this type has been introduced in the 1999 C standard
        - not in the 1998 C++ standard, but expected to be part of the next one.

        "long long" is an (at least) 64 bit integer,
        just as "long" is at least 32 bits.

        From the 99 C standard, 5.2.4.2.1:
        minimum value for an object of type long long int

        LLONG_MIN -922337203685477 5807 // -(263 - 1)

        - maximum value for an object of type long long int

        LLONG_MAX +92233720368547 75807 // 263 - 1

        - maximum value for an object of type unsigned long long int

        ULLONG_MAX 184467440737095 51615 // 264 - 1


        hth-Ivan
        --
        http://ivan.vecerina.com/contact/?subject=NG_POST <- e-mail contact form


        Comment

        Working...