[ < ] | [ > ] |  | [ << ] | [ Up ] | [ >> ] |  |  |  |  | [Top] | [Contents] | [Index] | [ ? ]

### 1.2.1 Filter Mode

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 section Diagnostics. Filter mode is indicated whenever these three conditions are all met.

- 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 section Filter Mode Options.
- Exactly one filename parameter appears on the command line, which is the name of the virtual machine code file.
- Either the filename comes last on the command line, or the ‘`--unparameterized`’ option precedes it, causing everything following it to be ignored.

Examples:

`avram mynewapp < inputfilename`

  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.)

`cat somefile | avram -r coolprog > outputfile`

  In this example, the ‘`-r`’ 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.

`avram -u devilmaycare.avm --bogusoption ignoredparameter`

  In this case, filter mode is forced by the ‘`-u`’ option despite indications to the contrary.

[ < ] | [ > ] |  | [ << ] | [ Up ] | [ >> ] |  |  |  |  | [Top] | [Contents] | [Index] | [ ? ]

This document was generated on November 8, 2012 using texi2html 1.82.