Next: Functions as Black Boxes
Up: Programming With Functions
Previous: Programming With Functions

Function Specifications

Suppose I tell you that I have written a Fortran function that solves equations of the form

where P and Q are real-valued constants and e is the base of the natural logarithm (approximately 2.718281828).

Suppose further that, as luck would have it, you could make use of just such a function in a program that you are currently writing. What exactly do you need to know about my function in order to use it in your program? (Obviously, you'll eventually need to get your hands on the code in order to combine it with your code, but let's not worry about that just now.) Think carefully about the question before you look at the answer.

Click here for the answer

You now have enough information to be able to write a program that uses my function.


Next: Functions as Black Boxes
Up: Programming With Functions
Previous: Programming With Functions

Hamlet Project
hamlet@cs.utah.edu