10.2. Getting On-Line Help for Functions

Gamma can display function definitions and parameters. To do this, start Gamma interactively and type the name of the function followed by a semicolon and return. For example,

andrewt@1:~ >  Gamma
Gamma (TM) Advanced Programming Language
Copyright (C) Cogent Real-Time Systems Inc., 1996. All rights 
reserved.
Version 2.4 Build 142 at Aug 25, 1999 21:39:51
Gamma> init_ipc;
(defun init_ipc (my_name &optional my_queue_name domain) ...)
Gamma> new;
(defun new (class) ...)
Gamma> array;
(defun array (&optional &rest contents) ...)
Gamma> insert;
(defun insert (array position_or_function value) ...)
	  

Note that the function definitions are described in the internal Lisp representation, as a list. The function is always displayed with the word defun first, followed by the name of the function, and then its syntax. The function arguments are enclosed in parentheses, but not separated by commas as they are in Gamma syntax. The Gamma function modifiers (!, ?, and ...) are represented by: &noeval, &optional, and &rest respectively. For details on these modifiers, see function in the Reference section. To give you a general idea, here is how the above functions definitions appear, first in Gamma syntax and then Lisp syntax:

init_ipc (my_name, my_queue_name?, domain?)
(defun init_ipc (my_name &optional my_queue_name domain) ...)
new (class)
(defun new (class) ...)
array (s_exp?...)
(defun array (&optional &rest contents) ...)
insert (array, position|compare_function, value)
(defun insert (array position_or_function value) ...)