
Mike Gerhardt's site features a series of screenshots of a Japanese TV show called Kodomo News ("Kids' News") that was "using toys and cartoons to show a trio of very glum-looking kids what was happening in Iraq. It was too bizzare to pass up, so I grabbed my camera and started snapping photos." The caption for this screenshot (there are 15 on the site) reads "Hussein in the middle of his Baghdad defenses."
Being able to understand that basic idea opens up a vast amount of power that can be used and abused, and we're going to look at a few of the better ways to deal with it in this article.
Posted by: Digory on January 18, 2004 10:18 PMEarlier 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: Harry on January 18, 2004 10:18 PMThis variable is then used in various lines of code, holding values given it by variable assignments along the way. In the course of its life, a variable can hold any number of variables and be used in any number of different ways. This flexibility is built on the precept we just learned: a variable is really just a block of bits, and those bits can hold whatever data the program needs to remember. They can hold enough data to remember an integer from as low as -2,147,483,647 up to 2,147,483,647 (one less than plus or minus 2^31). They can remember one character of writing. They can keep a decimal number with a huge amount of precision and a giant range. They can hold a time accurate to the second in a range of centuries. A few bits is not to be scoffed at.
Posted by: Daniel on January 18, 2004 10:19 PMSeth Roby graduated in May of 2003 with a double major in English and Computer Science, the Macintosh part of a three-person Macintosh, Linux, and Windows graduating triumvirate.
Posted by: Lancelot on January 18, 2004 10:20 PMWhen 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: Gerrard on January 18, 2004 10:20 PM