Next: , Previous: Table of Input Conversions, Up: C-Style I/O Functions


16.2.14 Numeric Input Conversions

This section describes the scanf conversions for reading numeric values.

The `%d' conversion matches an optionally signed integer in decimal radix.

The `%i' conversion matches an optionally signed integer in any of the formats that the C language defines for specifying an integer constant.

For example, any of the strings `10', `0xa', or `012' could be read in as integers under the `%i' conversion. Each of these specifies a number with decimal value 10.

The `%o', `%u', and `%x' conversions match unsigned integers in octal, decimal, and hexadecimal radices, respectively.

The `%X' conversion is identical to the `%x' conversion. They both permit either uppercase or lowercase letters to be used as digits.

Unlike the C language scanf, Octave ignores the `h', `l', and `L' modifiers.