Numeric Constants

Numbers used in CodeView commands represent integer constants. They are expressed in octal, hexadecimal, or decimal radix; the default is the current radix. The default input radix for the C expression evaluator is decimal. However, you can use the Radix (N) command to specify a different radix, as explained on page 444. CodeView displays the current radix in the lower-right corner of the status bar.

To override the current radix, you can use the C and C++ syntax for entering a constant of a different radix. In addition, CodeView supports the 0ndigits syntax to specify decimal numbers independently of the current radix.

The following table summarizes the syntax for different radixes:

Syntax Radix

digits Current radix
0digits Octal (base 8)
0ndigits Decimal (base 10)
0xdigits Hexadecimal (base 16)

Summary: Symbols take priority over numbers.

When hexadecimal is the current radix, it is possible to enter a value that could be either a symbol or a hexadecimal number. CodeView resolves the ambiguity by first searching for a symbol with that name. If no symbol is found, the value is a number. If you want to enter a number that is the same as a symbol in your program, use the explicit hexadecimal format (0xdigits).

For example, if the program contains a variable named abc and you enter abc, CodeView interprets the argument as the symbol. If you want to enter it as a number, enter it as 0xabc.