Subroutines and Control Abstraction Flashcards

1
Q

What is a Control Abstraction?

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

What goes on behind the scenes when calling a subroutine?

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

What are the three main places when maintaining a stack?

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

Calling Sequence Info:

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

Function caller or callee tasks:

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

One thing that can be done with procedures is inline expansion. What is this?

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

What are some inline keywords in C and Ada?

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

Parameter Passing Info:

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

Parameter Passing by Value:

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

Parameter Passing by Reference:

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

Parameter Passing by Read Only:

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

Parameter Passing by Sharing:

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

Three modes in Ada for passing parameters:

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

References in C++:

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

Passing Parameters by Name:

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

Some languages support named parameters that can be given an any order:

17
Q

Some languages support a variabled number of parameters:

18
Q

Many languages restrict what can be returned from a function. What are some examples?

19
Q

Generic Subroutines and Modules

20
Q

Implicit Parametric Polymorphism

21
Q

Explicit Polymorphic Generics

22
Q

What kind of types can be passed as a generic parameter?

23
Q

Implementation Options for Generic Parameters:

24
Q

(T/F)

In some languages, all instances share the same code at runtime.

25
Q

Constraints on Generic Parameters:

26
Q

Generic Parameters Constraints in Ada:

27
Q

Generic Parameter Constraints in Java:

28
Q

C++ templates are very powerful. Elaborate:

29
Q

What is an exception?

30
Q

What are some solutions for exceptions?

31
Q

In ML, what could be a good way to recover from an exception?

32
Q

What are some exception handling mechanisms?

33
Q

What can an exception handler do?

34
Q

Exception in Java:

35
Q

Exception Handling Techniques:

36
Q

Exception Handling Using a Table:

37
Q

What is the philosophy of exceptions?

38
Q

Explain Coroutines: