Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 

21.5. 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.

 
 
  Published under the terms of the GNU General Public License Design by Interspire