Chapter 9 Flashcards
Subprograms
Two fundamental abstraction facilities can be included in a programming language, they are?
1) process abstraction
2) data abstraction
Sub programs have what three characteristics?
1) Each subprogram has a single entry point
2) The calling program unit is suspended during the execution of the called subprogram, which implies that there is only one subprogram in execution at any given time
3) Control always returns to the caller when the subprogram execution terminates
A sub program ___ describes the interface to and the actions of the subprogram abstraction.
definition
A subprogram ___ is the explicit request that a specific subprogram be executed.
call
A subprogram is said to be ___ if after having been called, it has begun execution but has not yet completed that execution.
active
What are the two fundamental kinds of subprograms?
procedures, functions
A subprogram ___, is the first part of the definitions and serves several purposes.
header
What are the purposes of the subprogram header (3)?
1) Specifies that the following syntactic unit is a subprogram definition of some particular kind
2) If the subprogram is not anonymous, provides a name for the program
3) May specify a list of parameters
The ___ ____ of a subprogram contains the number, order, and types of its formal parameters.
parameter profile
The ___ of a subprogram is its parameter profile plus, if it is a function, its return type.
protocol
Function declarations are common in C & C++ programs, where they are called ___. Such declarations are often placed in header files.
prototypes
The parameters in the subprogram header are called ___ parameters.
formal
Subprogram call statements must include the name of the subprogram and a list of parameters to be bound to the formal parameters of the subprogram; these parameters are called ___ parameters.
actual
an effective and safe method of relating actual parameters to their corresponding formal parameters, are called ___ parameters
positional
When a parameter lists is long, ___ parameters, in which the name of the formal parameter to which an actual parameter is to be bound is specified with the actual parameter in a call.
keyword