up previous next
3.5.1 Introduction to User-Defined Functions
The most important construct in CoCoA programming is the user-defined function. These functions take parameters, perform CoCoA commands, and return values. Collections of functions can be stored in text files and read into CoCoA sessions using Source . To prevent name conflicts of the type that are likely to arise if functions are to be made available for use by others, the functions can be collected in packages, as described in a later chapter.

To learn about user functions, look up Define (online, enter ?define) for the complete syntax and for examples. The Tutorial also contains several examples of functions.