Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.


  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Chapter 11. Printing Text with the forma... > Control Sequences for Formatting Num...

12.3. Control Sequences for Formatting Numbers

The format command has many options designed specifically for controlling the appearance of numbers. Let’s look at some of the more useful ones.

12.3.1. Control Sequences for Formatting Integers

First, we can use format to display a number using a different base. For instance, we can display a number in hexadecimal (base-16) with the ˜x control sequence:


  

You are currently reading a PREVIEW of this book.

                                                                                        

Get instant access to over
$1 million worth of books and videos.

  

Start a Free Trial