You can define your own functions that work like MEL’s built-in functions. User defined functions are called procedures. Use procedures the encapsulate a series of commands you use often into a reusable part.
Like any function in MEL, a procedure can take any number of arguments (including no arguments), perform calculations, and return a value.
In other languages procedures are sometimes called subroutines.