		Adding a New Function to Unix APL\11


The following steps are required to add a new function:

    1.  Add a unique #define to apl.h  This assigns a number to
	the operation.  As an example, the statement:
	#define QFLOAT 141
	assigns the index 141 to QFLOAT, the quad-float function.

	Quad functions are added at this point in the same way
	that any other operators are.


    2.  Add the operator to the appropriate table in tab.c
	For special character operators (like "+"), the new
	operator should be added to the structure "tab".
	Quad functions should be added to the structure "qtab".
	The first entry in the table should be the symbol,
	the second should be the index (defined in step 1 above)
	and the last entry indicates the type of operation (monadic
	dyadic, etc.)


    3.  Add a case label to function "execute" in a1.c for the
	defined index.  Most quad functions probably will be
	added to the long list of case statements which includes
	QSIGNL and QFLOAT (two examples).  This defines what type
	of processing will be used for the function.


    4.  Change the value of exop[fn_index] in at.c  This array
	is a list of pointers to the C routines which perform the
	actual functions.  At the appropriate index, add the
	address of the function you are defining.  Be sure to
	declare this function with an "int" statement or a
	compilation error will result.


    5.  Add the appropriate name to the table "opname" in aw.c
	This table is used in )debug mode to print the names of
	the operators.


    6.  Immediate commands are executed in a slightly different
	manner.  If an immediate command is to be added, the
	index is defined under "Immediate sub-op codes" in apl.h
	and is defined in "comtab" in tab.c  There should be no
	change to at.c or aw.c, but the appropriate code must be
	added to "ex_immed()" in ah.c
