swirl Guide to OmniMark 5   OmniMark home
docs home 
IndexConceptsTasksSyntaxLibrariesOMX VariablesErrors
 
Prerequisite Concepts     Related Syntax  
Command-line options

An OmniMark command line can take a variety of forms. The following are a few examples:


  ; runs myfile.xom and takes all arguments from myfile.xar
  omnimark -s myfile.xom -argsfile myfile.xar


  ;runs whatever file is listed in myfile.xar and takes all arguments from that file
  omnimark -f myfile.xar


  ;uses omnimark v/m to run a program you compiled using omnic or a commercial version of the IDE
  omnivm -load myprogram.xvc

The command-line options available for OmniMark are:

-a [switch-name]

An abbreviation of the "-activate" option.
     -a my-switch

-activate [switch-name]

Activates a specified OmniMark global switch in your source program before the program is run (it sets the value of a global switch to "true"). This option overrides any initial values given to the switch in your source program.
     -activate my-switch

-alog [file-name]

Writes the error messages produced by OmniMark to the specified file. Unlike the "-log" option, "-alog" appends the messages to the file if the file already exists.
     -alog testprogram.log

-aof [file-name]

Appends the output of your program to the specified file if the file already exists, and creates and writes to the file if it doesn't. If you don't want to append the output, but want to overwrite the file, use the "-of" command-line option.
     -aof my-output.txt

-aos [stream-name] [file-name]

Opens and associates the specified stream with the specified file, and appends output to the file if it already exists.
     -aos my-stream my-file.txt

-argsfile [file-name]

Appends the contents of the specified file (the "argsfile") to the command line. The appended information is immediately processed as if it were part of the command line. Note that argsfile can contain further "-argsfile" and "-f" options.
     -argsfile testprogram.xar

-brief

Suppresses the OmniMark banner information containing the version and copyright information.
     -brief

-c [counter-name] [value]

An abbreviation of the "-counter" option. Sets the value of a global counter that is defined in your source program.
     -c my-counter 4

-c [integer-name] [value]

An abbreviation of the "-counter" option. Sets the value of a global integer that is defined in your source program.
     -c my-integer 3

-c [int32--name] [value]

An abbreviation of the "-counter" option. Sets the value of a global int32 that is defined in your source program.
     -c my-int32 2

-counter [counter-name] [value]

Sets the specified OmniMark global counter to the specified value before running the program. This option overrides any initial value specified in your program.
     -counter my-counter 44

-counter [integer-name] [value]

Sets the specified OmniMark global integer to the specified value before running the program. This option overrides any initial value specified in your program.
     -counter my-integer 33

-counter [int32-name] [value]

Sets the specified OmniMark global int32 to the specified value before running the program. This option overrides any initial value specified in your program.
     -counter my-int32 22

-d [stream-name] [value]

An abbreviation of the "-define" option.
     -d email-addr "foo@bar.baz"

-dea [switch-name]

An abbreviation of the "-deactivate" option.
     -dea my-switch

-deactivate [switch-name]

Deactivates the specified OmniMark global switch in your source program before the program is run (it sets the value of a global switch to "false"). This option overrides any initial values given to the switch in your program.
     -deactivate my-switch

-define [stream-name] [value]

Sets the value of a specified OmniMark global stream defined in your source program before the program is run. This option overrides any initial values given to the stream in your program.
    -define email-addr "foo@bar.baz"

-f [file-name]

An abbreviation of the "-argsfile" option.
    -f testprogram.xar

-ftrace

Causes a trace of function calls and returns to be written to the #error stream.
     -ftrace

-herald

This option is obsolete. It is an error to specify this option.

-i [include-path]

An abbreviation of the "-include" option.
     -i /usr/bin/omnimark/xin/

-include [include-path]

Specifies a directory in which to look for include files. If the command line contains more than one "-include" option, OmniMark will search these directories for include files in the order you've specified them. Note that you must include a trailing directory name separator (usually a slash) at the end of the specified path, as the path is prepended to the name of the include file when OmniMark searches for it.
     -include /usr/bin/omnimark/xin/

-l [library-path]

An abbreviation of the "-libpath" option.
     -l /usr/bin/lib/

-libpath [library-path]

Specifies a directory in which to look for files specified in the system identifier portion of an OmniMark library declaration. If the command line contains more than one "-libpath" option, OmniMark will search those directories in the order they are specified. Note that you must include a trailing directory name separator (usually a slash) at the end of the specified path, as the path is prepended to the name of the file when OmniMark searches for it.
     -libpath /usr/bin/lib/

-library [file-name]

Specifies the name of the file containing OmniMark SGML/XML library declarations and comments.
     -library my-library.xlr

-limit [number]

An abbreviation of the "-threshold" option.
     -limit 50

-load [virtual-machine-code-file-name]

Used to load and execute OmniMark programs that have been compiled into binary "*.xvc" files.
     -load myprog.xvc

-log [file-name]

Writes the error messages produced by OmniMark to the specified file. The "-log" option will replace the file contents if the file already exists. If you would rather the messages be appended to the end of the file, use the "-alog" option.
     -log testprogram.log

-nocount

Turns off the message that appears at the end of program execution giving the number of reported error and warning messages.
     -nocount

-noea

Short form of "-noenvarg".
     -noea

-noenvarg

Forces OmniMark to ignore include paths and external function library paths specified in environment variables and Windows registry entries.
     -noenvarg

-noernum

Suppresses the SGML/XML error number when SGML/XML error and warning messages are reported.
     -noernum

-nowait

OmniMark will not wait for an available license token if one is not available.
     -nowait

-of [file-name]

Writes all your program output to the specified file. If the file already exists, the contents of the file will be overwritten. If the file does not exist, the file will be created and written to. If you would rather append your program output to the file, use the "-aof" command-line option.
     -of my-output.txt

-os [stream-name] [file-name]

Opens the specified stream as the specified file before running the program. This option has the same effect as the OmniMark action "open [stream-name] as [file-name]". More than one "-os" option can be used on a command line.
     -os data-out program-output.txt

-s [program-file-name]

An abbreviation of the "-source" option.
     -s my-program.xom

-save [virtual-machine-code-file-name]

is an option available on Windows from the commercial version of the OmniMark IDE (from the File menu as "Create Virtual Machine Code File"), and on UNIX from the commercial OmniMark Compiler for UNIX. Creates a compiled code or virtual machine code (.xvc) file of the specified name. This compiled code can be executed by the OmniMark C/VM on Windows and by the OmniMark VM on UNIX. Once compiled, you can run the file with the OmniMark compiler/virtual machine or the OmniMark virtual machine, using the "-load" command-line option.
     -s myprogram.xom -save myprogram.xvc

-sb [program-file-name]

This command-line option combines "-s" and "-brief". Use this option to specify the name of the OmniMark program to execute, and to suppress the OmniMark banner information normally output when you run an OmniMark program from the command line.
     -sb myprogram.xom

-source [program-file-name]

Specifies the name of the OmniMark program to execute.
     -source my-program.xom

-src [program-file-name]

An abbreviation of the "-source" option.
     -src my-program.xom

-stats

Generates a short set of program execution statistics, including memory usage and execution times.
     -stats

-submit [directory-name]

Specifies a system-specific directory name, in which OmniMark searches for files named in "submit" actions if it cannot otherwise find the files. You can specify more than one "-submit" on a command line or in an arguments file, and OmniMark will search these directories in the order you specify them. You must include a trailing directory name separator (usually a slash) at the end of the specified directory, as the directory name is appended directly to the name of the file. Note that this command-line option is deprecated and will be removed in a future version of OmniMark.
     -submit /usr/bin/omnimark/submit/

-temp [file-name]

Specifies the name of the first temporary file OmniMark created during referent processing. Note that this command-line option is deprecated and will be removed in a future version of OmniMark.
     -temp my-tempfile

-temppfx [directory-name]

Specifies the prefix you want for all temporary files that OmniMark creates (for example, when resolving referents or when files are required during program execution). The entire path you specify is prepended to the name of the temporary files when OmniMark creates them. Note that if you are only specifying a directory, you must include a trailing directory name separator (usually a slash) at the end of the specified path. For example:

In UNIX, you could specify:

     -temppfx /usr/bin/omnimark/temp/

In Windows, you could issue this command line:

     -temppfx c:\temp\omnimark\om

The Windows example would create files with paths such as the following:

  c:\temp\omnimark\omreferent1.tmp
  c:\temp\omnimark\omreferent2.tmp

-term

Causes the OmniMark program to be read from standard input. When using "-term", you must specify an input file or use the "-save" option.
     -term

-threshold [number]

Specifies the maximum number of errors that can occur in your program. When the maximum number is reached, program execution terminates. By default, there is no limit.
     -threshold 30

-version

Displays the OmniMark banner information with the copyright, date, and version information.
     -version

-warning

Tells OmniMark to generate warning messages as well as error messages. (Usually, warning messages are suppressed.)
     -warning

-warnings

Another version of the "-warning" option.
     -warnings

-x [external-function-libraries-path]

An abbreviation of the "-xflpath" option.
     -x /usr/bin/omnimark/lib/=L.so

-xflpath [external-function-libraries-path]

Specifies the directory in which to look for external function libraries. OmniMark will always search for external function libraries first in the current directory, then in the specified directory. If the command line has more than one "-xflpath" option, OmniMark will search those directories in the order you've specified them. You must add the trailing slash and "=L.so" to specify external function libraries ending in ".so", or add the trailing slash and "=L.dll" to specify external function libraries ending in ".dll". If you do so, you can write platform-independent programs that will run on different systems just by changing the proper command-line options.
     -xflpath /usr/bin/omnimark/lib/=L.so

Prerequisite Concepts
     Command-line syntax
   Developing and running OmniMark programs
 
  Related Syntax
   #args
   library
 
----

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

Generated: August 11, 2000 at 3:06:17 pm
If you have any comments about this section of the documentation, send email to docerrors@omnimark.com

Copyright © OmniMark Technologies Corporation, 1988-2000.