Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如果我需要识别十六进制、八进制或二进制数,我可以使用前缀 0x、0、0b。它们不一定是通用的,但在编程世界中非常容易识别。
是否有类似十进制(以 10 为基数)数字的标识符?我希望能够明确地表示一个十进制基数,并且如果可能的话,我希望使用一种有点标准的符号。
八进制的标准前缀是前导“0”(至少在 C/C++/Perl 世界中)。所以我不建议使用“8x”。
如果你需要一个通用的表格,那么(number)b(base)在几个项目中都会用到。1b10、1b16、1b2 等可以给你一些标准的方式来表达基地。
(number)b(base)
我从未见过8x在任何地方使用过。0作为前缀 - 是的。
8x
0