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 8168027
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T20:23:18+00:00 2026-06-06T20:23:18+00:00

Why does Format(‘%u’, [-100]) result in ‘4294967196’ ? I tested this in D7 and

  • 0

Why does Format('%u', [-100]) result in '4294967196'? I tested this in D7 and XE2.

The documentation on the Format function says:

%u Unsigned decimal. Similar to %d, but no sign is output.

So I would have expected a result as '100'.

Is this a bug?

  • 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-06-06T20:23:20+00:00Added an answer on June 6, 2026 at 8:23 pm

    No, this is not a bug.

    You are telling Format that the first argument is an unsigned integer but in fact you passed a signed integer. That signed integer is being interpreted as unsigned and the bit pattern for a signed value of -100 equates to an unsigned value of 4294967196.

    In fact your code is in error. The format string defines a contract that the compiler cannot enforce because the arguments to Format are weakly typed. It is your responsibility to make sure that when you promise to pass an unsigned value that you do indeed pass an unsigned value. The mistake in the code here is logically equivalent to passing a string or a floating point value which is an error which you will much more readily recognise.

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

Sidebar

Related Questions

I was just reading this line: The first thing the format() method does is
Which format does this stirng 2010-06-19T06:28:01.077148400Z belong to? It represents 6/19/2010 11:58:01 AM. I
I'm trying to setup a json format link so I can parse. does this
What does this format do in CSS: p[class|=abc] and #pTag a[href^=https://] I'm not able
Adobe's documentation for the AMF format does not seem to actually specify the structure
What does this format of access token mean? AAAEGXJapkeoBAGRlZC7aBLhiZBMMUEVZAAF68ZBhZBwD0ER1MwvkXlRUZCwOaczfgsGwHbnAYBcTU9VrPZCyYw3pIJmCIMZBxSnCPNGqPRWZALgZDZD How can I get a
Why does (String/format %8s (Integer/toBinaryString 6)) result in a java.lang.ClassCastException: java.lang.String cannot be cast
db.define_table('person', Field('name'), format='%(name)s') What does this format do here?
I have a DateTime varchar in this format: 2005-08-08T00:00:00+01:00. Does this format have a
What video format does HTML5 support that is compatible with the iPhone/iPad? I was

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.