|
|||||
|
|||||
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:
do scan
repeat scan
string source
function of a do sgml-parse
scan
source of a do sgml-parse
submit
#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 |
Copyright © Stilo International plc, 1988-2008.