gamma, phgamma

gamma, phgamma — start Gamma and Gamma/Photon from the shell prompt.


gamma [-options] [program_name [program_arg]...]

phgamma [-options] [program_name [program_arg]...]


-c command

Execute the named command.


Declare all constants at startup.


Keep file and line # information on all cells .


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.


Declare all functions at startup.


Run as Gamma, regardless of name.


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.


Force entry into interactive mode after completion of the named application.


Run as Lisp, regardless of name.


Do not run the main function automatically.


Protect functions from the garbage collector. (Functions should not be redefined.)


Do not print copyright notice.


Set the local stack size in longwords.


Print the version number.


Exit immediately (usually used with -V).


The name of an executable program.


The program arguments.


A Gamma prompt.


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.)


[~/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