exu 3, key.ex

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

Hi
integer code

puts(1, "Press any key. I'll show you the key code. Press q to quit\n\n")
while 1 do
    code = get_key()
    if code != -1 then
	printf(1, "The key code is: %d\n", code)
	if code = 'q' then
	    exit
	end if  
    end if
end while


works



integer code

puts(1, "Press any key. I'll show you the key code. Press q to quit\n\n")
while 1 do
    code = get_key()
    if code != -1 then
	printf(1, "The key code is: %d\n", code)
	if code = 'q' then
	    exit
	end if  
    else
        printf(1, "\n", {})          
    end if
end while


seg faults

??

Chris

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

Search



Quick Links

User menu

Not signed in.

Misc Menu