Command-prompt tool and options

To run the Gosu command-prompt tool, you use the gosu command.

The following table lists the command-prompt tool parameters and options.

Task

Options

Example

Default behavior of the command prompt tool with no options is to run Gosu Lab.

gosu

Run a Gosu program. Include the .gsp file extension when specifying the file name.

filename.gsp

gosu myprogram.gsp

Enable checking for numeric overflow in arithmetic operations. This option requires a Gosu program to run.

-checkedArithmetic filename.gsp

gosu -checkedArithmetic myprogram.gsp

Add more paths to the search path for Java classes or Gosu classes. Separate paths with semicolons.

-classpath path

gosu -classpath C:\gosu\projects\libs

Evaluate a Gosu expression at the command prompt. Surround the entire expression with quotation marks. For any quotation mark in the expression, replace it with three quotation marks. For other special DOS characters such as > and <, precede them with a caret (^) symbol.

-e expression

-eval expression

gosu -e "new java.util.Date()"

gosu -e """"a"""+"""b""""

Print help information for this tool.

-h

-help

gosu -h

Show Gosu version

-v

-version

gosu -version

See also