Kevin calls my attention to a Ship of Fools bulletin board thread about organists who insinuate recognizable popular melodies into their improvisations. I’m not a subtle enough listener to pick up every such musical reference, but I’ve head more than one or two in my day, and I’m certain I’ve missed even more.
Posted by AKMA at November 29, 2003 07:57 AM | TrackBackLet's see an example by converting our favoriteNumber variable from a stack variable to a heap variable. The first thing we'll do is find the project we've been working on and open it up in Project Builder. In the file, we'll start right at the top and work our way down. Under the line:
Posted by: Michael at January 12, 2004 10:30 PMThe Stack is just what it sounds like: a tower of things that starts at the bottom and builds upward as it goes. In our case, the things in the stack are called "Stack Frames" or just "frames". We start with one stack frame at the very bottom, and we build up from there.
Posted by: Rose at January 12, 2004 10:30 PMThe Stack is just what it sounds like: a tower of things that starts at the bottom and builds upward as it goes. In our case, the things in the stack are called "Stack Frames" or just "frames". We start with one stack frame at the very bottom, and we build up from there.
Posted by: Barnabas at January 12, 2004 10:31 PMThis code should compile and run just fine, and you should see no changes in how the program works. So why did we do all of that?
Posted by: Augustus at January 13, 2004 09:58 AMWhen Batman went home at the end of a night spent fighting crime, he put on a suit and tie and became Bruce Wayne. When Clark Kent saw a news story getting too hot, a phone booth hid his change into Superman. When you're programming, all the variables you juggle around are doing similar tricks as they present one face to you and a totally different one to the machine.
Posted by: Justinian at January 13, 2004 09:58 AMWe can see an example of this in our code we've written so far. In each function's block, we declare variables that hold our data. When each function ends, the variables within are disposed of, and the space they were using is given back to the computer to use. The variables live in the blocks of conditionals and loops we write, but they don't cascade into functions we call, because those aren't sub-blocks, but different sections of code entirely. Every variable we've written has a well-defined lifetime of one function.
Posted by: Matilda at January 13, 2004 09:58 AM