
-----------------------------------
awesomej01
Fri Apr 30, 2004 6:36 pm

I don't know why this isn't working
-----------------------------------
For my final project, I planed to make a word processor.  As you all know, in a word processor you don't need to press a button to start typing.....you just type.  That is why, I made a procedure, that "getch" the input and quit the procedure when the user goes on to click a button that would take them to a different option or tool.  My code looks like this, however it doesn't work because it just keep getching and it won't exit the loop when the user clicks on another button.

This is basically what the code looks like

procedure text
    var x, y, btn : int
    loop
      mousewhere (x, y, btn)
      getch (ch) %character input
      exit when x >= 11 and x = 435 and y  51 then
            count := 0
            line := line - 18
            message := " "
            counter := 0
        end if
    end loop
end text

%This is the Main Program

var x, y, btn : int
loop
    mousewhere (x,y, btn)
    if x >= 11 and x = 435 and y  51 then
            count := 0
            line := line - 18
            message := " "
            counter := 0
        end if
    end if
    
    Font.Draw (message,maxx div 2, maxy div 2, font1, 7)

end text

%This is the Main Program

var x, y, btn : int

loop
    mousewhere (x, y, btn)
    if x >= 11 and x = 435 and y 