Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6244155
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T12:16:32+00:00 2026-05-24T12:16:32+00:00

I am reading the Google Go tutorial and saw this in the constants section:

  • 0

I am reading the Google Go tutorial and saw this in the constants section:

There are no constants like 0LL or 0x0UL

I tried to do a Google search but all that comes up are instances where people are using these constants but no explanation as to what they mean. 0x is supposed to start a hexadecimal literal but these are not characters that are possible in a hexadecimal number.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T12:16:32+00:00Added an answer on May 24, 2026 at 12:16 pm

    These are constants in C and C++. The suffix LL means the constant is of type long long, and UL means unsigned long.

    In general, each L or l represents a long and each U or u represents an unsigned. So, e.g.

    1uLL
    

    means the constant 1 with type unsigned long long.

    This also applies to floating point numbers:

    1.0f    // of type 'float'
    1.0     // of type 'double'
    1.0L    // of type 'long double'
    

    and strings and characters, but they are prefixes:

     'A'   // of type 'char'
    L'A'   // of type 'wchar_t'
    u'A'   // of type 'char16_t' (C++0x only)
    U'A'   // of type 'char32_t' (C++0x only)
    

    In C and C++ the integer constants are evaluated using their original type, which can cause bugs due to integer overflow:

    long long nanosec_wrong = 1000000000 * 600;
    // ^ you'll get '-1295421440' since the constants are of type 'int'
    //   which is usually only 32-bit long, not big enough to hold the result.
    
    long long nanosec_correct = 1000000000LL * 600;
    // ^ you'll correctly get '600000000000' with this
    
    int secs = 600;
    long long nanosec_2 = 1000000000LL * secs;
    // ^ use the '1000000000LL' to ensure the multiplication is done as 'long long's.
    

    In Google Go, all integers are evaluated as big integers (no truncation happens),

        var nanosec_correct int64 = 1000000000 * 600
    

    and there is no “usual arithmetic promotion“

        var b int32 = 600
        var a int64 = 1000000000 * b
        // ^ cannot use 1000000000 * b (type int32) as type int64 in assignment
    

    so the suffixes are not necessary.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am reading a tutorial and I looked all over google as well but
I've tried everything from reading the Netbeans help to browsing Google. This code works
reading this https://developers.google.com/in-app-payments/docs/tutorial Quoted from the above page: Because you sign the JWT using
I am reading the tutorial at http://code.google.com/p/google-web-toolkit-incubator/wiki/LoginSecurityFAQ It states Remember - you must never
I would like to start using Google App Engine for java . But i
I've been reading the documentation at: http://code.google.com/intl/nl/apis/maps/documentation/places/#PlaceSearches But How do I modify the Place
I've reading the Google Checkout docs but I haven't found anything similar to PayPal
I'm reading this google guide and using this sample code provided by google ,
my setup is ubuntu - gitolite - msysgit. After following this tutorial : https://sites.google.com/site/senawario/home/gitolite-tutorial
After reading some of the jQuery vs ext js questions here and google search

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.