Sophie

Sophie

distrib > Mandriva > 2010.0 > i586 > media > contrib-release > by-pkgid > 3e60ff9d4d6f58c8fbd17208f14089fa > files > 292

octave-doc-3.2.3-3mdv2010.0.i586.rpm

<html lang="en">
<head>
<title>Numeric Input Conversions - Untitled</title>
<meta http-equiv="Content-Type" content="text/html">
<meta name="description" content="Untitled">
<meta name="generator" content="makeinfo 4.13">
<link title="Top" rel="start" href="index.html#Top">
<link rel="up" href="C_002dStyle-I_002fO-Functions.html#C_002dStyle-I_002fO-Functions" title="C-Style I/O Functions">
<link rel="prev" href="Table-of-Input-Conversions.html#Table-of-Input-Conversions" title="Table of Input Conversions">
<link rel="next" href="String-Input-Conversions.html#String-Input-Conversions" title="String Input Conversions">
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
<meta http-equiv="Content-Style-Type" content="text/css">
<style type="text/css"><!--
  pre.display { font-family:inherit }
  pre.format  { font-family:inherit }
  pre.smalldisplay { font-family:inherit; font-size:smaller }
  pre.smallformat  { font-family:inherit; font-size:smaller }
  pre.smallexample { font-size:smaller }
  pre.smalllisp    { font-size:smaller }
  span.sc    { font-variant:small-caps }
  span.roman { font-family:serif; font-weight:normal; } 
  span.sansserif { font-family:sans-serif; font-weight:normal; } 
--></style>
</head>
<body>
<div class="node">
<a name="Numeric-Input-Conversions"></a>
<p>
Next:&nbsp;<a rel="next" accesskey="n" href="String-Input-Conversions.html#String-Input-Conversions">String Input Conversions</a>,
Previous:&nbsp;<a rel="previous" accesskey="p" href="Table-of-Input-Conversions.html#Table-of-Input-Conversions">Table of Input Conversions</a>,
Up:&nbsp;<a rel="up" accesskey="u" href="C_002dStyle-I_002fO-Functions.html#C_002dStyle-I_002fO-Functions">C-Style I/O Functions</a>
<hr>
</div>

<h4 class="subsection">14.2.14 Numeric Input Conversions</h4>

<p>This section describes the <code>scanf</code> conversions for reading numeric
values.

   <p>The &lsquo;<samp><span class="samp">%d</span></samp>&rsquo; conversion matches an optionally signed integer in decimal
radix.

   <p>The &lsquo;<samp><span class="samp">%i</span></samp>&rsquo; conversion matches an optionally signed integer in any of
the formats that the C language defines for specifying an integer
constant.

   <p>For example, any of the strings &lsquo;<samp><span class="samp">10</span></samp>&rsquo;, &lsquo;<samp><span class="samp">0xa</span></samp>&rsquo;, or &lsquo;<samp><span class="samp">012</span></samp>&rsquo;
could be read in as integers under the &lsquo;<samp><span class="samp">%i</span></samp>&rsquo; conversion.  Each of
these specifies a number with decimal value <code>10</code>.

   <p>The &lsquo;<samp><span class="samp">%o</span></samp>&rsquo;, &lsquo;<samp><span class="samp">%u</span></samp>&rsquo;, and &lsquo;<samp><span class="samp">%x</span></samp>&rsquo; conversions match unsigned
integers in octal, decimal, and hexadecimal radices, respectively.

   <p>The &lsquo;<samp><span class="samp">%X</span></samp>&rsquo; conversion is identical to the &lsquo;<samp><span class="samp">%x</span></samp>&rsquo; conversion.  They
both permit either uppercase or lowercase letters to be used as digits.

   <p>Unlike the C language <code>scanf</code>, Octave ignores the &lsquo;<samp><span class="samp">h</span></samp>&rsquo;,
&lsquo;<samp><span class="samp">l</span></samp>&rsquo;, and &lsquo;<samp><span class="samp">L</span></samp>&rsquo; modifiers.

   </body></html>