A new blog by Alfred Schein:
Posted by Brian Stefans at September 3, 2003 10:27 AM | TrackBackThis blog is interesting, but did you know that " allodox " is a copyrighted name ?
Posted by: Tim van Dijk at November 29, 2003 02:52 AMThese secret identities serve a variety of purposes, and they help us to understand how variables work. In this lesson, we'll be writing a little less code than we've done in previous articles, but we'll be taking a detailed look at how variables live and work.
Posted by: Manasses at January 19, 2004 05:45 AMNote the new asterisks whenever we reference favoriteNumber, except for that new line right before the return.
Posted by: Francis at January 19, 2004 05:46 AMInside each stack frame is a slew of useful information. It tells the computer what code is currently executing, where to go next, where to go in the case a return statement is found, and a whole lot of other things that are incredible useful to the computer, but not very useful to you most of the time. One of the things that is useful to you is the part of the frame that keeps track of all the variables you're using. So the first place for a variable to live is on the Stack. This is a very nice place to live, in that all the creation and destruction of space is handled for you as Stack Frames are created and destroyed. You seldom have to worry about making space for the variables on the stack. The only problem is that the variables here only live as long as the stack frame does, which is to say the length of the function those variables are declared in. This is often a fine situation, but when you need to store information for longer than a single function, you are instantly out of luck.
Posted by: Dudley at January 19, 2004 05:46 AMEarlier 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.
Posted by: Rook at January 19, 2004 05:47 AMThis 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: Adam at January 19, 2004 05:47 AM