swirl
Guide to OmniMark 7   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 ] [ LEGACYLIBRARIES ] [ ERRORS ]

OmniMark 7.1.2 Documentation Generated: June 28, 2005 at 5:44:53 pm
If you have any comments about this section of the documentation, send email to [email protected]

Copyright © Stilo Corporation, 1988-2005.