January 24, 2003
Hey poetry bloggers...
I don't want to be a bully, an innee or an outee, but don't some of you want to taste the fruits of movabletype.org. I'll be honest and say that it's a bit harder than the blogger blogs to set up, but once you get to the premised land you'll be a pretty hippy with it.
Posted by Brian Stefans at January 24, 2003 06:13 PM
The 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.
The rest of our conversion follows a similar vein. Instead of going through line by line, let's just compare end results: when the transition is complete, the code that used to read:
Earlier I mentioned that variables can live in two different places. We're going to examine these two places one at a time, and we're going to start on the more familiar ground, which is called the Stack. Understanding the stack helps us understand the way programs run, and also helps us understand scope a little better.
Let'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: