swirl
Guide to OmniMark 8   OmniMark home
docs home 
IndexConceptsTasksSyntaxLibrariesLegacy LibrariesErrors
 
  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 arguments
   Input
 
 

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

OmniMark 8.2.0 Documentation Generated: March 13, 2008 at 3:33:48 pm
If you have any comments about this section of the documentation, please use this form.

Copyright © Stilo International plc, 1988-2008.