Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.std.c++ > #176

Re: An hexadecimal digits group separator for long 64bit addresses

Message-ID <1308849997.2080.3.camel@sara> (permalink)
Newsgroups comp.std.c++
From Magnus Fromreide <cscpp@magfr.users.lysator.liu.se>
Subject Re: An hexadecimal digits group separator for long 64bit addresses
Organization A noiseless patient Spider
References < f81be81a-36de-482a-ad63-480bec9a9933@x38g2000pri.googlegroups.com>
Date 2011-06-23 19:32 -0600

Show all headers | View raw


On Thu, 2011-06-16 at 12:07 -0600, Yaniv Abraham wrote:
> Hello Everyone,
> As 64bit word processors become more and more widespread, some of
> which also see embedded applications (such as the NetLogic XLP800-
> family of system processors) the current syntax in C and C++ for
> hexadecimal numbers notation (and thus their notation of encoding
> addresses), a long string of hexadecimal digits with the 0x prefix,
> become IMHO too long making it hard to interpret and grasp quickly.
> Is there a proposal to `enhance' this notation in the next C/C++
> standard to make hexadecimal numbers easier to type and understand?
> C/C++ can adopt the notation that technical hardware manuals are using
> for a long time of using the `_' character to separate between 4 or 8
> nibbles (4bit) sequences of digits (e.g. instead of reading
> 0xFFFF58AE3BBE33AC I think it will be much easier to read
> 0xFFFF58AE_3BBE33AC or even 0xFFFF_58AE_3BBE_33AC).
> What do you think? Anyone?

I think you are to late.
This would clash with user-defined literals, wouldn't it?

int operator "" _1234 (int n) { return 17; }

0x12cd_1234;

/MF



--
[ comp.std.c++ is moderated.  To submit articles, try posting with your ]
[ newsreader.  If that fails, use mailto:std-cpp-submit@vandevoorde.com ]
[              --- Please see the FAQ before posting. ---               ]
[ FAQ: http://www.comeaucomputing.com/csc/faq.html                      ]

Back to comp.std.c++ | Previous | NextNext in thread | Find similar


Thread

Re: An hexadecimal digits group separator for long 64bit addresses Magnus Fromreide <cscpp@magfr.users.lysator.liu.se> - 2011-06-23 19:32 -0600
  Re: An hexadecimal digits group separator for long 64bit addresses ThosRTanner <ttanner2@bloomberg.net> - 2011-06-25 08:51 -0600
    Re: An hexadecimal digits group separator for long 64bit addresses Miles Bader <miles@gnu.org> - 2011-06-26 20:09 -0600
  Re: An hexadecimal digits group separator for long 64bit addresses Miles Bader <miles@gnu.org> - 2011-06-25 08:50 -0600

csiph-web