User-defined subroutines
It is possible to define subroutines within a Mosel (.mos) program. However, in certain cases it may be preferrable to implement subroutines in the form of a module:
- An implementation of this function in C exists already.
- The subroutine manipulates data structures that are not supported by Mosel or accesses low-level (system) functions that are not available in Mosel.
- The subroutine is time-critical and must be executed as fast as possible.