swirl
Guide to OmniMark 9   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
 
Related Concepts
 
 

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

OmniMark 9.1.0 Documentation Generated: September 2, 2010 at 1:51:21 pm
If you have any comments about this section of the documentation, please use this form.

Copyright © Stilo International plc, 1988-2010.