
domain - creation of a domain

Calling sequence:
domain()
domain(dom)
domain(table)

Parameter:
dom     --  any domain
table   --  table

Summary:

domain() creates a domain with no entries.  Entries can be added to this
domain later with domattr.

domain(dom) creates a copy of the domain dom.  This is necessary because
changes to a domain are always carried out directly. If a domain is changed
then the value of this domain is changed in all data in which it occurs.
However, if the domain is copied (with the function domain) before the
changes are made, then the changes do not occur in the other domain because
the newly created domain is not included in any of them (see also the
examples).

domain(table) creates a new domain which includes those entries also found
in the tabletable. domain is a kernel function.

>>  domain();

      domain( )

>>  d1:=domain(): d2:=d1: d2::x:=y: d1::x;

      y

>>  d1:=domain(): d2:=domain(d1): d2::x:=y: d1::x;

      FAIL

>>  d:=domain(table("x"=y)): d::x;

      y

See also:  domattr , new

