12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970 |
- <html lang="en">
- <head>
- <title>Filter Mode - avram - a virtual machine code interpreter</title>
- <meta http-equiv="Content-Type" content="text/html">
- <meta name="description" content="avram - a virtual machine code interpreter">
- <meta name="generator" content="makeinfo 4.13">
- <link title="Top" rel="start" href="index.html#Top">
- <link rel="up" href="Modes-of-Operation.html#Modes-of-Operation" title="Modes of Operation">
- <link rel="prev" href="Modes-of-Operation.html#Modes-of-Operation" title="Modes of Operation">
- <link rel="next" href="Parameter-Mode.html#Parameter-Mode" title="Parameter Mode">
- <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="Filter-Mode"></a>
- <p>
- Next: <a rel="next" accesskey="n" href="Parameter-Mode.html#Parameter-Mode">Parameter Mode</a>,
- Previous: <a rel="previous" accesskey="p" href="Modes-of-Operation.html#Modes-of-Operation">Modes of Operation</a>,
- Up: <a rel="up" accesskey="u" href="Modes-of-Operation.html#Modes-of-Operation">Modes of Operation</a>
- <hr>
- </div>
- <h4 class="subsection">1.2.1 Filter Mode</h4>
- <p><a name="index-filter-mode-21"></a><a name="index-modes-22"></a>In filter mode, the argument to the function given by the virtual code
- is taken from standard input, and the result is written to standard
- output, except for error messages resulting from a failure to evaluate
- the function, which are written to standard error.
- See <a href="Diagnostics.html#Diagnostics">Diagnostics</a>. Filter mode is indicated whenever these three
- conditions are all met.
- <ul>
- <li>Either at least one of the filter mode options appears on the command
- line preceding the first filename parameter, or there are no options at
- all. See <a href="Filter-Mode-Options.html#Filter-Mode-Options">Filter Mode Options</a>.
- <li>Exactly one filename parameter appears on the command line,
- which is the name of the virtual machine code file.
- <li>Either the filename comes last on the command line, or the
- <samp><span class="option">--unparameterized</span></samp> option precedes it, causing
- everything following it to be ignored.
- </ul>
- <p class="noindent">Examples:
- <dl>
- <dt><kbd>avram mynewapp < inputfilename</kbd><dd><a name="index-standard-input-23"></a>In this example, filter mode is recognized by default because there are
- no options or input files on the command line to indicate
- otherwise. (The input file redirected into standard input is not treated
- by the shell as a command line argument.)
- <br><dt><kbd>cat somefile | avram -r coolprog > outputfile</kbd><dd>In this example, the <samp><span class="option">-r</span></samp> option gives it away, being one of the
- filter mode options, in addition to the fact that there are no input
- file parameters or application-specific options.
- <br><dt><kbd>avram -u devilmaycare.avm --bogusoption ignoredparameter</kbd><dd>In this case, filter mode is forced by the <samp><span class="option">-u</span></samp>
- option despite indications to the contrary.
- </dl>
- </body></html>
|