At the beginning of a CoCoA session, CoCoA reads in a file called
'init.coc'. This file performs certain initialization routines, reads
in standard packages, and sets up global aliases for the packages. It
also reads in a file called 'userinit.coc'. It is in this latter file
that users should put their own commands to be run when CoCoA starts.
For example, suppose a user wants a file called 'MyFile.coc'---
containing function definitions, variable assignments, etc.---to
automatically be read into the CoCoA system on start-up. It suffices
to add the following line to 'userinit.coc':
<<'MyFile.coc';
To load the package with identifier $contrib/mypackage, contained in a
file 'MyPackage.pkg' and use MP as an alias, it suffices to add the
following lines to 'userinit.coc' (you may want to look at the section
of the manual entitled "Package Sourcing" for more details):
<<'MyPackage.pkg';
Alias MP := $contrib/mypackage;
|