swirl
Guide to OmniMark 7   OmniMark home
docs home 
IndexConceptsTasksSyntaxLibrariesLegacy LibrariesErrors
 
  Related Syntax   Related Concepts  
built-in variable  

#args

 
 

Purpose

A built-in shelf containing the arguments passed to your OmniMark program. You can pass arguments to your OmniMark program on the command line of the OmniMark Server Engine or by setting the appropriate project options in OmniMark Studio.

OmniMark reserves all tokens starting with a single hyphen (but not two hyphens) for passing options to the OmniMark Server Engine. Any other token, or a token starting with -- (two hyphens), is treated as an argument to the OmniMark program.

The #args shelf contains only the command-line arguments, not the OmniMark Server Engine options.

If your command line contains the arguments:

   input.txt output.txt

you can access these arguments as follows:

  process
     local stream out
     open out as file #args[2]
     using output as out
      submit file #args[1]

#command-line-names is a deprecated synonym for #args

  Related Syntax
   #main-input
 
Related Concepts
   Command line arguments
 
 

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

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

Copyright © Stilo Corporation, 1988-2005.