3.2 Overview: MUF (cont'd) Calling Functions: So far, all versions of our program have only included one function, but programs can have as many functions as you want. Functions (also called `words') are blocks of code executed as a
single unit. They begin with a colon followed by the name of the
function, and end with a semi-colon. The name of a function can be
pretty much anything you want, but should include at least one
non-numeric character. You should also avoid using function names
already defined in Once they have been defined, functions can be called simply by including their name in the program's code. The following version of Tinker.muf does the same thing as the previous two, but this time the `greater' or `less than' notifications are handled by separate functions:
|