CSC 351 - Chapter 9 Flashcards

1
Q

Subprogram

A
  • has a single entry point.
  • the calling program unit is suspended during execution
  • control returns to caller when done
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Subprogram Definition

A
  • describes the actions of the subprogram abstraction
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Subprogram Call

A
  • request that a specific subprogram is called
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Two Fundamental Abstraction Facilities

A
  • process abstraction

- data abstraction

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Subprogram Header

A
  • first part of the definition including the name, kind of subprogram and parameters
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Parameter Profile

A
  • number, order and type of parameters
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Protocol

A
  • parameter profile and return type
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Subprogram Declaration

A
  • protocol but not the body of the subprogram
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Formal Parameter

A
  • dummy variable used in the subprogram header
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Actual Parameter

A
  • value or address used in subprogram call statement
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Positional Parameter

A
  • binding of actual parameter to formal parameter is bound by position
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Keyword Parameter

A
  • name of formal parameter is specified with actual parameter
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Two Categories of Subprograms

A
  • procedures

- functions

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Local Variables

A
  • defined inside subprogram

- can be static or stack dynamic

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Parameter Passing

A
  • pass by value
  • pass by reference
  • pass by name
  • pass by result
  • pass by value-result
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

Design Considerations for Parameter Passing

A
  • efficiency

- oneway or twoway data transfer

17
Q

Closure

A
  • subprogram and the environment where it was defined
18
Q

Coroutine

A
  • subprogram that has multiple entries and controls them