Subj : Question
To   : Frozen Fire
From : Angus Mcleod
Date : Thu Aug 08 2002 01:10 am

 Re: Question
 By: Frozen Fire to Angus Mcleod on Wed Aug 07 2002 03:48:00

>  > You should not rely on the un-initialized value of a variable unless the
>  > language specification specifically states what that value will be.
>
> In most of the source files that came with SBBS, I
> did not see any variables initialized, so I assumed the default for anything
> declared was off, or zero, save for things such as "str", which are used
> internally.

It's always a good idea to program as though there is a gun pointed at
your foot.

       if ($x < 0) {
               # Negative $x
               .  .  .
       } elsif ($x == 0) {
               # Zero $x
               .  .  .
       } elsif ($x > 0) {
               # Positive $x
               .  .  .
       } else {
               # impossible
               print "Eeeeeeek!!!";
               exit 1;
       }

Just because it's physically and mathematically impossible for something
to happen, doesn't mean it WON'T happen!  :-)


---
� Synchronet � Where we BAJA Rob into writing our modules.  The ANJO BBS