COPA .def files
---------------

@@package <package name>

@@begin <objname>
<name> <type> <info> : <default-val> : <flags> :<constraint> : <description>
<name> <type> <info> : <default-val> : <flags> :<constraint> : <description>
<name> <type> <info> : <default-val> : <flags> :<constraint> : <description>
..
..
@@end

@@begin <objname>
<name> <type> <info> : <default-val> : <flags> :<constraint> : <description>
..
..
@@end

@@begin <objname>
..
..


* Reserved words: @@begin  @@end  Proc

* The @@begin and @@end statements must begin in column 1.

* All attributes (with the exception of overrides, see below) must have a name, a type, 
  a constraint, and a description.  Whether or not a default value is required depends 
  upon the application.

* Default values must be single line only, no more than 200 characters in length, and may not
    contain colons (:).

* Comments have a pound sign (#) in the first non-white-space character, and are ignored.

* Blank lines are ignored.

<package> contains the name of the package to which all objects defined within the template
    file will belong.  The name should be a single word.  The main purpose of packages is
    to allow code to be compartmentalized, and to speed up run-time binding.

<objname> contains the name of the object.  It should be a single word.  Objects which will
    never be executed directly by a user should be given a name which ends in a dash (-).

<name> contains the name of the attribute.  It should be a single word (no white space),
    and not contain colons.  Reserved words should not be used.  

<type> is a single-character storage type indicator:
	I=integer  	integer
	D=double 	floating point
	C=character	character data, on one or more lines.
	X=execute	same as character, plus include an external proc (more about this below).

<info> usually contains a length integer which is used to help allocate storage. For the X type, 
    it contains the name of an already-defined proc.
      For I, D, and C data types, the <info> field may contain a length integer.  It is generally
    specified when an approximate maximum size of an item is small and easy to guess.  For C types, 
    it corresponds to the number of characters, e.g. the length of "yellow" is 6.  For the other 
    types, it corresponds to the number of list members, e.g. the length of "1.2" is 1, and the 
    length of "1 4 4 3" is 4.

<flags> contains information about the system properties of the attribute.  The following flags
    are defined:
	U	uniheritable (attributes are inheritable by default)
	H	hidden (will not be shown in a user-dump)

<constraint> contains information for building data entry screens and range checking during 
    data entry.  It is not currently used by this system.

<description> is a text description for reference use during data entry. It should be phrased 
    keeping in mind that it will be used verbatim in data entry screens.


* For optimal efficiency, an application should request attributes in the same order as given 
    in the template.  This is not mandatory, and may not always be convenient.


The X data type (include external)
----------------------------------

  Suppose you are writing a template for a graphics program using the above syntax.  After a while 
you find that the same properties keep coming up over and over, such as text size, font, etc. 
for each text object.  What is desired is a way to define these properties once, then reference
them from a number of different places.  The X data type allows this.
  So, a default object called "text" is defined containing three attributes: size, font, and
color.  It can then be referenced from other object templates using the X data type, e.g.

title  X text : The Last of the Mohicans

The application can now access the text using the name "title", and access the text attributes 
using the names "title/size", "title/font", and "title/color".  The application should be made 
to first check to see if "title" contains anything, and if so, ask for these attributes in the 
order defined in the "text" template.

  Other than the external include function described above, X datatypes behave exactly like C 
(character) data types.

Overrides
---------

  Overrides are used along with X attributes, when a value other than the "standard" is 
desired.  In the above example, suppose that the default value for text/size is 10, but
we want to display our title in 18 point type.  We need to use an override.  Overrides
must come BEFORE the related X attribute.  For example:
  
title/size    : 20
title  X text : The Last of the Mohicans

Note that overrides do not have constraints or descriptions.




Adding new objects
------------------

To add new objects, do the following:

[] make a template (.def file)
[] write a gen routine, and add a call statement to gen.c
[] if the object will be executable, write an exec routine and add a call statement to exec.
