Skip to content

Conversation

cousteaulecommandant
Copy link
Contributor

Base 10 is not special. Printing a negative number such as -15 in base 16 should show -F, not FFFFFFF1. For the result with the many Fs, the number should be converted to unsigned long (or unsigned int for fewer Fs).
Issue #4460 complains about the behavior of print for negative ints (which prints them as unsigned long), and I think the best solution would be to be consistent with what negative integers actually represent rather than with what printf does in C.

Make negative integers be represented with "-" in any base, not just base 10.
@facchinm facchinm added the Print and Stream class The Arduino core library's Print and Stream classes label Jan 20, 2017
@CLAassistant
Copy link

CLAassistant commented Apr 9, 2021

CLA assistant check
All committers have signed the CLA.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Print and Stream class The Arduino core library's Print and Stream classes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy