Procedures Structure
Procedures encapsulate, i.e. package up, a computation to be used anywhere, anytime
Parts of a procedure specification …
- Name -- term used to refer to the computation, e.g. convertC2F
- Definition -- the program steps to compute the result, e.g. tempInF = 9 * tempInC / 5 + 32
- Parameters -- the names of the input data and output results e.g. tempInC As Integer, tempInF As Integer
- Declaration -- the packaging of the name, definition and parameters
Private Sub convertC2F (tempInC As Integer, tempInF As Integer)
tempInF = 9 * tempInC / 5 + 32