GNU Info

Info Node: (gdb.info)Numbers

(gdb.info)Numbers


Next: Messages/Warnings Prev: Screen Size Up: Controlling GDB
Enter node , (file) or (file)node

Numbers
=======

   You can always enter numbers in octal, decimal, or hexadecimal in
GDB by the usual conventions: octal numbers begin with `0', decimal
numbers end with `.', and hexadecimal numbers begin with `0x'.  Numbers
that begin with none of these are, by default, entered in base 10;
likewise, the default display for numbers--when no particular format is
specified--is base 10.  You can change the default base for both input
and output with the `set radix' command.

`set input-radix BASE'
     Set the default base for numeric input.  Supported choices for
     BASE are decimal 8, 10, or 16.  BASE must itself be specified
     either unambiguously or using the current default radix; for
     example, any of

          set radix 012
          set radix 10.
          set radix 0xa

     sets the base to decimal.  On the other hand, `set radix 10'
     leaves the radix unchanged no matter what it was.

`set output-radix BASE'
     Set the default base for numeric display.  Supported choices for
     BASE are decimal 8, 10, or 16.  BASE must itself be specified
     either unambiguously or using the current default radix.

`show input-radix'
     Display the current default base for numeric input.

`show output-radix'
     Display the current default base for numeric display.


automatically generated by info2www version 1.2.2.9