swirl Guide to OmniMark 5   OmniMark home
docs home 
IndexConceptsTasksSyntaxLibrariesOMX VariablesErrors
 
  Related Syntax   Related Concepts  
built-in variable   #main-input    

Purpose

When files are named on the command line, #main-input supplies the text of each of the files in the order in which their names appear. When no files are provided, #main-input identifies the same source as #process-input (that is, "standard input").

#main-input explicitly identifies a source of input, and can be used as the scanning source in:

#main-input is usually read incrementally, meaning that the contents of the stream are not all buffered in memory before processing begins. In some situations, however, this is not the case. If you use #main-input as a string expression (for example: length of #main-input), as a passed "value" argument in a function, or as part of a concatenated string (for example: set this-string to str-var || #main-input), the entire contents of #main-input will be read into memory.

If you scan #main-input and exit the scan before the data is consumed, you can scan #main-input again. You can test to see if all the input has been consumed by scanning for value-end.

  Related Syntax
   #main-output
   #process-input
   declare #main-input has
   flush
   buffered, unbuffered
 
Related Concepts
   Buffering I/O
   Command-line syntax
   Input
 
----  

Top [ INDEX ] [ CONCEPTS ] [ TASKS ] [ SYNTAX ] [ LIBRARIES ] [ OMX ] [ OMX ] [ ERRORS ]

Generated: August 11, 2000 at 3:06:51 pm
If you have any comments about this section of the documentation, send email to docerrors@omnimark.com

Copyright © OmniMark Technologies Corporation, 1988-2000.