AKMA's Random Thoughts

April 23, 2003

Zzzzzzz

Long day driving. Nate’s okay, though he’s tired, facing end-of-term and summer concerns. Another long day tomorrow.

Posted by AKMA at April 23, 2003 08:10 PM | TrackBack
Comments

When 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: Timothy at January 13, 2004 10:53 AM

This 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: Heneage at January 13, 2004 10:54 AM

We 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: Phillipa at January 13, 2004 10:55 AM