Re: Newbie very confused

new topic     » goto parent     » topic index » view thread      » older message » newer message
crusty said...

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. 
-------------------- 
-- HELLO1.ex 
 
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

Hi Alec:
What is flashing on your screen is a error message.
Because you are running a DOS program in Windows the interpreter
is flashing an error message up on the screen an closing the window.
If you look in the directory where you are running your
program.You will see a text file called ex.err which contains
the error information.
If you are trouble shooting a DOS program in Windows and
you want to see whats flashing on the screen.
You can place:

if getc(0) then 
-- pause 
end if 

at the end of your program
which will keep the DOS window open until you hit a key.

-------------------- 
-- HELLO1.ex 
-- You need a constant because TRUE is not a keyword. 
 
constant TRUE = 1 
-- You need a variable to hold key.  
integer k 
 
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 
-------------------- 


bernie

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu