< Prev page
Contents
Next page >
(Routines part 2: Comparisons and loops)
Some routines should do the exact same thing every time they are called.
Cube() is a perfect example of this. However, imagine a
program that did the same thing every single time. It wouldn't be very interesting
or interactive. That is why programming languages include ways to allow the
program to make decisions and act differently based on those decisions. This whole
subject is generally referred to as program logic. For example, a billing
program would send out an invoice only if the order is unpaid. A utility program
might delete only those files that haven't been used in over 6 months. And so on.
In order to make decisions, computers operate in terms of black and white. Either
something is or it isn't. There is no maybe. There is no sort of. Programmers
call these conditions true and false.
Pay attention, this is important
In Inform, when an expression results in zero (0), the expression is false.
Anything other than zero (0) is considered true.
Screech...Boom!! This guide has come to a crashing halt. I have not given up,
but I have also not updated the guide since January 1998 (except for this). I'll announce
in recs.arts.int-fiction whenever I actually add more. Sorry to all those who were
chugging along just fine up to this point.
|
< Prev page
Contents
Next page >
This page hosted by
Get your own Free Home Page
And yes, folks, it's really free. I'm too cheap to pay for this.