If an OmniMark program is invoked in an environment in which standard error, standard input, and standard output are not available, you will receive a runtime error if you attempt to read standard input or to write to standard output or standard error. If you include the
no-default-io declaration in your program, however, attempts to use these standard I/O mechanisms will be flagged as compile time errors.
We recommend that you add a
no-default-io declaration to any program that will be invoked in an environment where standard I/O is not available.
Note that the
no-default-io declaration applies to attempts to read
#process-input and attempts to write to
#error. It cannot detect attempts by external functions to write to standard I/O.
declare no-default-io global stream in-file global stream out-file process set in-file to file "inputfile" open out-file as "outputfile" using input as in-file using output as out-file submit #current-input close out-file
no-default-io declaration cannot be used in aided translation type programs
(cross-translate, up-translate, down-translate, and context-translate).
no-default-io declaration cannot be used in a module.