Re: Newbie very confused
- Posted by gbonvehi Mar 16, 2009
- 1334 views
Sorry about this. MAybe it should be a new thread. Done everything suggested and I'm now 'running'. Well, staggering might be a better description of progress.
PROBLEM. Most of the demo ???.ex files I try to run don't! All I get is a quicl flash of the dos panel on the screen. Frustrated.
I tried this.
position(10,10)
puts(1,"More hello world") puts(1, "\n\n") puts(1, "\nPress Enter. (q to quit) ") while TRUE do k = get_key() if k = 'q' then abort(0) elsif k != -1 then exit end if end while
Looked simple enough but dos panel flashes onto the screen and then disappears.
Some examples don't do that but I can't see where the difference lies.
Thanks alec
The problem there is the elseif, as get_key() returns -1 when no key is pressed, it is exiting the while when it runs.
Cheers,
Guillermo