| |
| | Basic Lesson 9 (Site not responding. Last check: 2007-10-27) |
 | | Typically a subprogram will handle just one assignment in a main program, while the job of the main program is to shuffle the action back and forth in an organized way between all the subprograms. |
 | | Then the subprogram "shares" the value of Z with the main program - that is, before it terminates it informs the main program of the value of Z. A second way of informing the main program of the sum is to leave the subprogram alone, but insert a COMMON SHARED statement into the main program. |
 | | The subprogram then substitutes V back for A, W for B, X for C, Y for D, and Z for E, and the main program accepts these new values for A, B, C, D, E. Variables in a subprogram may be strings or arrays as well as numbers. |
| www.math.hawaii.edu /~hile/basic/basic9.htm (1858 words) |
|