Diff for /gforth/doc/gforth.ds between versions 1.166 and 1.167

version 1.166, 2006/10/27 21:47:01 version 1.167, 2006/12/28 14:52:19
Line 317  Files Line 317  Files
   
 * Forth source files::            * Forth source files::          
 * General files::                 * General files::               
   * Redirection::                 
 * Search Paths::                  * Search Paths::                
   
 Search Paths  Search Paths
Line 415  Assembler and Code Words Line 416  Assembler and Code Words
 * 386 Assembler::               Deviations and special cases  * 386 Assembler::               Deviations and special cases
 * Alpha Assembler::             Deviations and special cases  * Alpha Assembler::             Deviations and special cases
 * MIPS assembler::              Deviations and special cases  * MIPS assembler::              Deviations and special cases
 * PowerPC assembler::             * PowerPC assembler::           Deviations and special cases
 * Other assemblers::            How to write them  * Other assemblers::            How to write them
   
 Tools  Tools
Line 8215  Files that are processed by some other p Line 8216  Files that are processed by some other p
 @menu  @menu
 * Forth source files::            * Forth source files::          
 * General files::                 * General files::               
   * Redirection::                 
 * Search Paths::                  * Search Paths::                
 @end menu  @end menu
   
Line 8274  A definition in ANS Forth for @code{requ Line 8276  A definition in ANS Forth for @code{requ
 @file{compat/required.fs}.  @file{compat/required.fs}.
   
 @c -------------------------------------------------------------  @c -------------------------------------------------------------
 @node General files, Search Paths, Forth source files, Files  @node General files, Redirection, Forth source files, Files
 @subsection General files  @subsection General files
 @cindex general files  @cindex general files
 @cindex file-handling  @cindex file-handling
Line 8324  doc-stdout Line 8326  doc-stdout
 doc-stderr  doc-stderr
   
 @c ---------------------------------------------------------  @c ---------------------------------------------------------
 @node Search Paths,  , General files, Files  @node Redirection, Search Paths, General files, Files
   @subsection Redirection
   @cindex Redirection
   @cindex Input Redirection
   @cindex Output Redirection
   
   You can redirect the output of @code{type} and @code{emit} and all the
   words that use them (all output words that don't have an explicit
   target file) to an arbitrary file with the @code{>outfile
   ... outfile<} construct, used like this:
   
   @example
   : print-some-warning ( n -- )
     stderr >outfile cr ." warning# " . outfile< ;
   @end example
   
   After the @code{outfile<}, the original output direction is restored;
   this construct is nestable and safe against exceptions.  Similarly,
   there is a construct @code{>infile ... infile<} for redirecting the
   input of @code{key} and its users (any input word that does not take a
   file explicitly).
   
   If you do not want to redirect the input or output to a file, you can
   also make use of the fact that @code{key}, @code{emit} and @code{type}
   are deferred words (@pxref{Deferred Words}).  However, in that case
   you have to worry about the restoration and the protection against
   exceptions yourself; also, note that for redirecting the output in
   this way, you have to redirect both @code{emit} and @code{type}.
   
   doc->outfile
   doc-outfile<
   doc->infile
   doc-infile<
   
   @c ---------------------------------------------------------
   @node Search Paths,  , Redirection, Files
 @subsection Search Paths  @subsection Search Paths
 @cindex path for @code{included}  @cindex path for @code{included}
 @cindex file search path  @cindex file search path

Removed from v.1.166  
changed lines
  Added in v.1.167


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>