What language?
a) Unfortunately, I don't know exactly how to answer this. It depends somewhat on the language. In some languages, a "module" is multiple subroutines, in others, it is just one subroutine. Generally, at the end of a subroutine, local variables that were created on the "stack" are destroyed. Values that are to be passed back are placed in locations where the calling subroutine will be able to retrieve them. The question is too general to answer exactly.
b. This, again, depends on the programming language.
|