Sophie

Sophie

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

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

<html lang="en">
<head>
<title>Paging Screen Output - 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="Terminal-Output.html#Terminal-Output" title="Terminal Output">
<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="Paging-Screen-Output"></a>
<p>
Up:&nbsp;<a rel="up" accesskey="u" href="Terminal-Output.html#Terminal-Output">Terminal Output</a>
<hr>
</div>

<h5 class="subsubsection">14.1.1.1 Paging Screen Output</h5>

<p>When running interactively, Octave normally sends any output intended
for your terminal that is more than one screen long to a paging program,
such as <code>less</code> or <code>more</code>.  This avoids the problem of having a
large volume of output stream by before you can read it.  With
<code>less</code> (and some versions of <code>more</code>) you can also scan forward
and backward, and search for specific items.

   <p>Normally, no output is displayed by the pager until just before Octave
is ready to print the top level prompt, or read from the standard input
(for example, by using the <code>fscanf</code> or <code>scanf</code> functions). 
This means that there may be some delay before any output appears on
your screen if you have asked Octave to perform a significant amount of
work with a single command statement.  The function <code>fflush</code> may be
used to force output to be sent to the pager (or any other stream)
immediately.

   <p>You can select the program to run as the pager using the <code>PAGER</code>
function, and you can turn paging off by using the function
<code>more</code>.

<!-- pager.cc -->
   <p><a name="doc_002dmore"></a>

<div class="defun">
&mdash; Command: <b>more</b><var><a name="index-more-710"></a></var><br>
&mdash; Command: <b>more</b><var> on<a name="index-more-711"></a></var><br>
&mdash; Command: <b>more</b><var> off<a name="index-more-712"></a></var><br>
<blockquote><p>Turn output pagination on or off.  Without an argument, <code>more</code>
toggles the current state. 
The current state can be determined via <code>page_screen_output</code>. 
</p></blockquote></div>

<!-- pager.cc -->
   <p><a name="doc_002dPAGER"></a>

<div class="defun">
&mdash; Built-in Function: <var>val</var> = <b>PAGER</b> ()<var><a name="index-PAGER-713"></a></var><br>
&mdash; Built-in Function: <var>old_val</var> = <b>PAGER</b> (<var>new_val</var>)<var><a name="index-PAGER-714"></a></var><br>
<blockquote><p>Query or set the internal variable that specifies the program to use
to display terminal output on your system.  The default value is
normally <code>"less"</code>, <code>"more"</code>, or
<code>"pg"</code>, depending on what programs are installed on your system. 
See <a href="Installation.html#Installation">Installation</a>. 
<!-- Texinfo @sp should work but in practice produces ugly results for HTML. -->
<!-- A simple blank line produces the correct behavior. -->
<!-- @sp 1 -->

     <p class="noindent"><strong>See also:</strong> <a href="doc_002dmore.html#doc_002dmore">more</a>, <a href="doc_002dpage_005fscreen_005foutput.html#doc_002dpage_005fscreen_005foutput">page_screen_output</a>, <a href="doc_002dpage_005foutput_005fimmediately.html#doc_002dpage_005foutput_005fimmediately">page_output_immediately</a>, <a href="doc_002dPAGER_005fFLAGS.html#doc_002dPAGER_005fFLAGS">PAGER_FLAGS</a>. 
</p></blockquote></div>

<!-- pager.cc -->
   <p><a name="doc_002dPAGER_005fFLAGS"></a>

<div class="defun">
&mdash; Built-in Function: <var>val</var> = <b>PAGER_FLAGS</b> ()<var><a name="index-PAGER_005fFLAGS-715"></a></var><br>
&mdash; Built-in Function: <var>old_val</var> = <b>PAGER_FLAGS</b> (<var>new_val</var>)<var><a name="index-PAGER_005fFLAGS-716"></a></var><br>
<blockquote><p>Query or set the internal variable that specifies the options to pass
to the pager. 
<!-- Texinfo @sp should work but in practice produces ugly results for HTML. -->
<!-- A simple blank line produces the correct behavior. -->
<!-- @sp 1 -->

     <p class="noindent"><strong>See also:</strong> <a href="doc_002dPAGER.html#doc_002dPAGER">PAGER</a>. 
</p></blockquote></div>

<!-- pager.cc -->
   <p><a name="doc_002dpage_005fscreen_005foutput"></a>

<div class="defun">
&mdash; Built-in Function: <var>val</var> = <b>page_screen_output</b> ()<var><a name="index-page_005fscreen_005foutput-717"></a></var><br>
&mdash; Built-in Function: <var>old_val</var> = <b>page_screen_output</b> (<var>new_val</var>)<var><a name="index-page_005fscreen_005foutput-718"></a></var><br>
<blockquote><p>Query or set the internal variable that controls whether output intended
for the terminal window that is longer than one page is sent through a
pager.  This allows you to view one screenful at a time.  Some pagers
(such as <code>less</code>&mdash;see <a href="Installation.html#Installation">Installation</a>) are also capable of moving
backward on the output. 
</p></blockquote></div>

<!-- pager.cc -->
   <p><a name="doc_002dpage_005foutput_005fimmediately"></a>

<div class="defun">
&mdash; Built-in Function: <var>val</var> = <b>page_output_immediately</b> ()<var><a name="index-page_005foutput_005fimmediately-719"></a></var><br>
&mdash; Built-in Function: <var>val</var> = <b>page_output_immediately</b> (<var>new_val</var>)<var><a name="index-page_005foutput_005fimmediately-720"></a></var><br>
<blockquote><p>Query or set the internal variable that controls whether Octave sends
output to the pager as soon as it is available.  Otherwise, Octave
buffers its output and waits until just before the prompt is printed to
flush it to the pager. 
</p></blockquote></div>

<!-- file-io.cc -->
   <p><a name="doc_002dfflush"></a>

<div class="defun">
&mdash; Built-in Function:  <b>fflush</b> (<var>fid</var>)<var><a name="index-fflush-721"></a></var><br>
<blockquote><p>Flush output to <var>fid</var>.  This is useful for ensuring that all
pending output makes it to the screen before some other event occurs. 
For example, it is always a good idea to flush the standard output
stream before calling <code>input</code>.

        <p><code>fflush</code> returns 0 on success and an OS dependent error value
(&minus;1 on unix) on error. 
<!-- Texinfo @sp should work but in practice produces ugly results for HTML. -->
<!-- A simple blank line produces the correct behavior. -->
<!-- @sp 1 -->

     <p class="noindent"><strong>See also:</strong> <a href="doc_002dfopen.html#doc_002dfopen">fopen</a>, <a href="doc_002dfclose.html#doc_002dfclose">fclose</a>. 
</p></blockquote></div>

<!-- FIXME - maybe this would be a good place to describe the -->
<!-- following message: -->
<!-- warning: connection to external pager (pid = 9334) lost - -->
<!-- warning: pending computations and output may be lost -->
<!-- warning: broken pipe -->
   </body></html>