gamma, phgamma
gamma,
phgamma — start Gamma and
Gamma/Photon from the shell prompt.
Syntax
gamma [-options] [program_name [program_arg]...]
phgamma [-options] [program_name [program_arg]...]
Options
- -c
command
- Execute the named command.
- -C
- Declare all
constants at startup.
- -d
- Keep file and line # information on all cells .
- -e
- Do not enter interactive mode.
- -f
filename
- 'Require' (read and process) the named file and set
the -e flag. As many files as desired can
be processed by repeating this option. Although the file is
run just like the executable named in
program_name, the two are not the
same, because no program arguments can be passed to a file
using the -f option. When the file
has been completely processed, Gamma moves on to the next
option, if any, and will not necessarily enter the
interactive mode.
- -F
- Declare all functions at startup.
- -G
- Run as Gamma,
regardless of name.
- -h
- Print a help message and exit.
- -H
heapsize
- Set the heap growth rate increment (default 2000).
- -i
filename
- 'Require' the named file. This is identical to the
-f option, except that Gamma will enter
the interactive mode after all options have been processed.
- -I
- Force entry into interactive mode after completion
of the named application.
- -L
- Run as Lisp,
regardless of name.
- -m
- Do not run the main function automatically.
- -p
- Protect functions
from the garbage collector. (Functions should not
be redefined.)
- -q
- Do not print copyright notice.
- -s
- Set the local stack size in longwords.
- -V
- Print the version number.
- -X
- Exit immediately (usually used with
-V).
- program_name
- The name of an executable
program.
- program_arg
- The program arguments.
Description
This command starts Gamma or
Gamma/Photon in interactive mode at the shell prompt. Flags are
processed in the order given on the command line, and can appear
more than once.
If the name of the executable contains the word
'Lisp', then it will use the Lisp grammar, otherwise it will use
the Gamma grammar.
The -c and
-f used together make possible several interesting
ways to invoke and use Gamma. For example:
gamma -f domainA.g -c "init = methodA(3);" my_application "thing"
permits a user to specify a particular file to be
processed, perhaps containing application-specific methods, then
execute an arbitrary initialization expression, and finally start the
intended application with specified arguments.
The
-c argument used with -e has
Gamma execute a command and exit without going into interactive
mode. For example:
gamma -i hanoi.g -c 'princ (hanoi (3), "\n");' -e
would load the Tower of Hanoi code, print the solution to the 3-disk
hanoi problem, and then exit. (The single quotes are used to hide the
double quotes from the shell.)
Example
[~/usr/devtools]$ gamma -m
Gamma(TM) Advanced Programming Language
Copyright (C) Cogent Real-Time Systems Inc., 1996-2001. All rights reserved.
Version 4.0 Build 31 at Aug 12 2001 09:57:56
Gamma>