
-----------------------------------
baz.
Sun Jan 20, 2008 7:30 pm

Why won't it exit?
-----------------------------------
Okay, I have to make a game for an assignment, yet for some reason, when I click the exit button it won't exit. Instead, it goes to the result screen. 
Can some one tell me how that is possible? It will clear screen alright. But why on earth would it go to the results screen when it clearly says "exit"?
here's the code for the selection statements. 
var x1instruction, x2instruction, y1instruction, y2instruction : real
var x1lesson, x2lesson, y1lesson, y2lesson : real
var x1quiz, x2quiz, y1quiz, y2quiz : real
var x1exit, x2exit, y1exit, y2exit : real
var button : int
var x, y : int


x1instruction := 240 - 40
x2instruction := 240 + 40
x1lesson := 340 - 40
x2lesson := 340 + 40
x1quiz := 440 - 40
x2quiz := 440 + 40
x1exit := 550 - 40
x2exit := 550 + 40

var btnNum, btnUpDown : int
loop
    mousewhere (x, y, button)
    if x1instruction 