Next: top
Up: Iteration
Previous: top
  Contents
  Index
startsection
section 1 0mm-3.5ex plus -1ex minus -.2ex0.7ex plus.2exFunctions
A few times now, we have mentioned ``all the things functions are good
for.'' By now, you might be wondering what exactly those things are.
Here are some of them:
- Giving a name to a sequence of statements makes your program
easier to read and debug.
- Dividing a long program into functions allows you to separate parts of
the program, debug them in isolation, and then compose them into a whole.
- Functions facilitate both recursion and iteration.
- Well-designed functions are often useful for many programs. Once you
write and debug one, you can reuse it.
root
2004-05-05