node to node copy

Ron Wichers Schreur ronny@cs.kun.nl
Mon, 12 Jan 1998 23:16:09 +0100


Martin Wierich wrote (to the Clean Discussion List):

> Erik Zuurbier wrote, that he needs a function for making a copy of
> an array.  I once wrote the function "CopyArray". [..]

> The upper version of "CopyArray" worked on Clean (1.2 I think).
> Unfortunately my Clean compiler doesn't work anymore. [...].
> I get the message "can't execute the clean-compiler".

This is the message you get from clm when it cannot find the
Clean compiler executable ("cocl" on Unix). If you try

	% clm -V

then the value of clean_lib_directory should be the directory
with the cocl command. This variable is patched in the clm
executable when you install Clean. If you move the directory
where Clean is installed, clm will not work anymore. The solution
is to change the INSTALL_???_DIR variables in the Makefile of
the Clean distribution directory. Then use "make" (or "make io"
if you use the IO library).

If you can't change the Clean installation, you can also set
the variables CLEANLIB and CLEANPATH to override the built-in
values of clean_lib_directory and clean_default_path_list.
However I would also notify your system adiministrator that
the Clean installation is not working properly.

> [..] 
> Let me finally ask: Why are arrays not allowed to contain
> unique elements ?

Arrays can contain unique elements. Your Copy function is
restricted to arrays with non-unique elements, because the
original array and the copy share their elements.


Cheers,

Ronny Wichers Schreur