Reasons to use user defined functions

  • a complex computation can be hidden behind a single command

  • repetitive code can be eliminated (a function can be called several times in a program)