[futurebasic] Re: [FB] send me your bugs, your quirks, your huddled glitches

Message: < previous - next > : Reply : Subscribe : Cleanse
Home   : June 1998 : Group Archive : Group : All Groups

From: Chris Stasny <staz@...>
Date: Wed, 17 Jun 1998 12:47:07 -0500
>but let's all have fun with this example, chosen because it's my favorite to
>date. Variables are global.
>
>LOCAL FN expandInput
>  SELECT wholeInput$
>    CASE "Y"
>      wholeInput$ = "YES"
>    CASE "N"
>      IF questionWaiting = 1 THEN wholeInput$ = "NO" ELSE wholeInput$ =
>"NORTH"
>    CASE "S"
>      wholeInput$ = "SOUTH"
>    CASE "E"
>      wholeInput$ = "EAST"
>  <and so on through the compass, winding up at SW > SOUTHEAST>
>  END SELECT
>END FN
>
>When this function chooses to misbehave, it normally does so by failing to
>execute at all (consistently, and independent of whether it's a separate
>function, as here, or part of a longer filterCmds routine). But on one recent
>compile, it worked like this (consistently):
>input Y > no change
>input N > YES
>input S > NORTH/NO
>input E > SOUTH
>... and so on through the entire compass.
>
>So what I'd like to get is anyone's notion of _any possible_ cause for this
>particular misbehavior (should I offer a prize for the most creative?).
>

That one's easy. Add a CASE ELSE and TRON BREAK to see what the value of
wholeInput$ turned out to be. You'll see what the bad string is and you
will also know what routine called it.  Since everything is global, you are
likely to find that another function has corrupted the variable.



If a cow laughed, would milk come out her nose?

-STAZ   ~)~

--------------------------------------------------------------
STAZ Software * 4387 Leisure Time Dr * Diamondhead, MS 39525
--------------------------------------------------------------
Orders: 800-348-2623      EMail http: //www.stazsoftware.com
  Tech: 228-255-7085             FAX: 228-255-7086
--------------------------------------------------------------