contentsconceptssyntaxlibrariessampleserrorsindex
Full text search
built-in variable   #main-input    
  Related Syntax   Related Concepts  

Purpose

One of the built-in input sources.

In a translation program, #main-input identifies the text that will be automatically processed. Thus, 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 on the command line. When no file is named on the command line, #main-input identifies the same source as #process-input (that is, "standard input").

In a process program, #main-input always identifies the same source as #process-input.

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

The use of #main-input has the following constraints:

Further difficulty arises when #main-input does not have an "end". This can happen when it is piped from a keyboard or other such device, where the input can wait forever for another character. This will "hang" a program that attempts to read in all #main-input at once.

In light of these difficulties, take care to design your program to read #main-input incrementally.

The appropriate herald type for #main-input is "source".

  Related Syntax
   #main-output
   #process-input
   declare #main-input has
 
Related Concepts
   Input/Output
 
----  

Top [CONTENTS] [CONCEPTS] [SYNTAX] [LIBRARIES] [SAMPLES] [ERRORS] [INDEX]

Generated: April 21, 1999 at 2:01:00 pm
If you have any comments about this section of the documentation, send email to [email protected]

Copyright © OmniMark Technologies Corporation, 1988-1999.