January 08, 2003

Skid 10

i've had letters
stick to chalk
we require it
pen kneads a diplomat
pronouncing the "e"s
with a gimlet eye
balancing a plug
maneuvers her charms
into film
letters stick to chalk
malarie gets depressive
but high marks for candor

to have come
all the way here
and be addressed
cowardly
never looked straight at
"subversive switzerland"
was the new bestseller
but purple balls
was an international trend
cheap digital cameras
you swing from the hips
(i don't believe i've taken my pills

this morning
hence the visionary
interlude) a prelude
to the lines about
ancient lots
korean mums
she coughs her phonemes
to stringent beats
flights to canada
ricochet to alaska
yes, give them a population
of quarrelsome poets

Posted by Brian Stefans at January 8, 2003 05:09 PM
Comments

Note first that favoriteNumbers type changed. Instead of our familiar int, we're now using int*. The asterisk here is an operator, which is often called the "star operator". You will remember that we also use an asterisk as a sign for multiplication. The positioning of the asterisk changes its meaning. This operator effectively means "this is a pointer". Here it says that favoriteNumber will be not an int but a pointer to an int. And instead of simply going on to say what we're putting in that int, we have to take an extra step and create the space, which is what does. This function takes an argument that specifies how much space you need and then returns a pointer to that space. We've passed it the result of another function, , which we pass int, a type. In reality, is a macro, but for now we don't have to care: all we need to know is that it tells us the size of whatever we gave it, in this case an int. So when is done, it gives us an address in the heap where we can put an integer. It is important to remember that the data is stored in the heap, while the address of that data is stored in a pointer on the stack.

Posted by: Etheldreda at January 18, 2004 11:04 PM

Seth 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: Juliana at January 18, 2004 11:04 PM

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: Randall at January 18, 2004 11:05 PM

When a variable is finished with it's work, it does not go into retirement, and it is never mentioned again. Variables simply cease to exist, and the thirty-two bits of data that they held is released, so that some other variable may later use them.

Posted by: John at January 18, 2004 11:05 PM

Note the new asterisks whenever we reference favoriteNumber, except for that new line right before the return.

Posted by: Roland at January 18, 2004 11:06 PM