[A petition signed by 1600+ at the time of posting; from Ammiel Alcalay.]
No to war on Iraq .... No to dictatorship Petition
Posted by Brian Stefans at February 16, 2003 11:24 PMIf you are against the war, visit http://www.angelfire.com/weird/bluemoon/petition.html
Sign the e-petition against war on Iraq!
Note the new asterisks whenever we reference favoriteNumber, except for that new line right before the return.
Posted by: Walter on January 18, 2004 07:55 PMBut variables get one benefit people do not
Posted by: Dorothy on January 18, 2004 07:55 PMWe 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: Dionise on January 18, 2004 07:56 PMA variable leads a simple life, full of activity but quite short (measured in nanoseconds, usually). It all begins when the program finds a variable declaration, and a variable is born into the world of the executing program. There are two possible places where the variable might live, but we will venture into that a little later.
Posted by: Elizabeth on January 18, 2004 07:56 PMInside 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: Hugh on January 18, 2004 07:57 PM