A common way to enter CoCoA commands is to first type them into a
text editor, then cut-and-paste into the CoCoA window. For one, this
saves a lot of retyping in the case of syntax errors. In addition,
one may save a sequence of commands in a file and read them into a
CoCoA session with the 'Source' command (or equivalently, with '<<').
For instance, if a sequence of CoCoA commands is saved in the file
'MySession', one may enter
<< 'MySession';
to run the commands (give the full pathname, or store your file in the
cocoa directory). User-defined functions are often stored in files
and sourced in this way.
|