-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Underscores only every 2^n digits in non-decimal numbers #2538
Comments
I see use cases for splitting this at other points (e.g. a bit mask with different groups of masks) but that seems minor in this case and there aren't other issues so this seems fine. Though the description isn't quite accurate, it should be between powers of four. |
In most cases I'd agree, but I guess a fairly common pattern would be splitting hexadecimal between bytes, as in |
Sorry, powers of eight. Not n^2 |
Ah, we meant the same thing. To clarify, I meant the most natural splits are nibbles ( |
What it does: Warns if an integral or floating point non-decimal number is split somewhere other than between n^2 and (n^2)+1 (for constant n≥1). Hexadecimal, octal and binary numbers are used when dealing with 2^n fractions or multiples of bytes.
Examples:
0xabc_def
. Probably what was meant was0xab_cdef
,0xab_cd_ef
or there's a missing nibble in the second half.0xa_b_c_d_e_f
is more verbose but no clearer than0xabcdef
.The text was updated successfully, but these errors were encountered: