The interface of a function is simple:
- it's name
- the type of the result it returns
- the number and types of its parameters
- "what it does" -- i.e. how output, the result, is computed from the
input parameters.
If the code truly represents a function, then this is all you need to
know to use it.
Think of a library as a collection of functions. Some of the
functions are written to be used by others and some are internal ones
which have been written to support the others.
We say that the functions which are intended to be used by others are
exported by the library.
What does the user of a library have to know?
The names of the functions
What they do
The kinds, types and order of the arguments
What type is being returned
Hmmm .... sounds like some well commented function prototypes ...
CSEE
|
201
|
201 F'06
|
lectures
|
news
|
help
Tuesday, 26-Sep-2006 07:32:25 EDT