Using Functions

You're already an old hand at using functions in Maple. But you might be surprised to realize that you already know how to use functions in your C programs, too! Think back to the homework for the previous lesson, in which you found the positions of a squatter's joints. What functions did you use then?

Click here for the answer.

When you give values to a function and get back a result value, we say that you have invoked or called the function. The values that you give to the function are called arguments. Consider the following C statement:

      x2 = x1 + cos(theta);

That statement contains an invocation of the built-in cos function. The value of the variable theta is the argument to the cos function.


Eric N. Eide
Hamlet Project
Department of Computer Science
University of Utah