Call Stack as Diagram

Programming Language

imperative / any

Form

Representation

Attribution — Origin / Source

Collected by Craig S. Miller — Interview, John Rogers

Conceptual Advantage

Distinguishes between variable values in the main function and the parameters and local variables in a called function.

Mapping

PLNM
local variable box with label at bottom of a frame labeled with function name
parameter box with label at the top of a frame labeled with function name
variable in main box with label in a frame called main

Draws Attention To

Each function call/frame has its own set of stored values.

Use When

To demonstrate what happens to variable values when they are passed to a function..

Cost

Requires that the instructor writes out variable boxes for each function call.

Comments or Feedback?

Do you have feedback on this notional machine? Did you find a mistake, or do you have a request for improvement? You can create an Issue on GitHub, where the description is hosted. This way we can see your feedback and address it.

For this, you need a GitHub account. Then follow this link to see the source file of this page. In there, click the ... left of the highlighted line, then pick "Reference in a new issue".

Create an Issue on GitHub