Filter-Mode.html 3.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. <html lang="en">
  2. <head>
  3. <title>Filter Mode - avram - a virtual machine code interpreter</title>
  4. <meta http-equiv="Content-Type" content="text/html">
  5. <meta name="description" content="avram - a virtual machine code interpreter">
  6. <meta name="generator" content="makeinfo 4.13">
  7. <link title="Top" rel="start" href="index.html#Top">
  8. <link rel="up" href="Modes-of-Operation.html#Modes-of-Operation" title="Modes of Operation">
  9. <link rel="prev" href="Modes-of-Operation.html#Modes-of-Operation" title="Modes of Operation">
  10. <link rel="next" href="Parameter-Mode.html#Parameter-Mode" title="Parameter Mode">
  11. <link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
  12. <meta http-equiv="Content-Style-Type" content="text/css">
  13. <style type="text/css"><!--
  14. pre.display { font-family:inherit }
  15. pre.format { font-family:inherit }
  16. pre.smalldisplay { font-family:inherit; font-size:smaller }
  17. pre.smallformat { font-family:inherit; font-size:smaller }
  18. pre.smallexample { font-size:smaller }
  19. pre.smalllisp { font-size:smaller }
  20. span.sc { font-variant:small-caps }
  21. span.roman { font-family:serif; font-weight:normal; }
  22. span.sansserif { font-family:sans-serif; font-weight:normal; }
  23. --></style>
  24. </head>
  25. <body>
  26. <div class="node">
  27. <a name="Filter-Mode"></a>
  28. <p>
  29. Next:&nbsp;<a rel="next" accesskey="n" href="Parameter-Mode.html#Parameter-Mode">Parameter Mode</a>,
  30. Previous:&nbsp;<a rel="previous" accesskey="p" href="Modes-of-Operation.html#Modes-of-Operation">Modes of Operation</a>,
  31. Up:&nbsp;<a rel="up" accesskey="u" href="Modes-of-Operation.html#Modes-of-Operation">Modes of Operation</a>
  32. <hr>
  33. </div>
  34. <h4 class="subsection">1.2.1 Filter Mode</h4>
  35. <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
  36. is taken from standard input, and the result is written to standard
  37. output, except for error messages resulting from a failure to evaluate
  38. the function, which are written to standard error.
  39. See <a href="Diagnostics.html#Diagnostics">Diagnostics</a>. Filter mode is indicated whenever these three
  40. conditions are all met.
  41. <ul>
  42. <li>Either at least one of the filter mode options appears on the command
  43. line preceding the first filename parameter, or there are no options at
  44. all. See <a href="Filter-Mode-Options.html#Filter-Mode-Options">Filter Mode Options</a>.
  45. <li>Exactly one filename parameter appears on the command line,
  46. which is the name of the virtual machine code file.
  47. <li>Either the filename comes last on the command line, or the
  48. <samp><span class="option">--unparameterized</span></samp> option precedes it, causing
  49. everything following it to be ignored.
  50. </ul>
  51. <p class="noindent">Examples:
  52. <dl>
  53. <dt><kbd>avram mynewapp &lt; inputfilename</kbd><dd><a name="index-standard-input-23"></a>In this example, filter mode is recognized by default because there are
  54. no options or input files on the command line to indicate
  55. otherwise. (The input file redirected into standard input is not treated
  56. by the shell as a command line argument.)
  57. <br><dt><kbd>cat somefile | avram -r coolprog &gt; outputfile</kbd><dd>In this example, the <samp><span class="option">-r</span></samp> option gives it away, being one of the
  58. filter mode options, in addition to the fact that there are no input
  59. file parameters or application-specific options.
  60. <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>
  61. option despite indications to the contrary.
  62. </dl>
  63. </body></html>