#ON KEY STATEMENT
3 messages in this thread
I am new to my model 100, to CIS and this SIG. Have attempted to locate answers
which may already exist and have been unsuccessful. I am presently experiencing
a problem with the ON KEY statement. After entering a GOSUB routine due to
striking F5, I branch to a routine which issues another ON KEY statement and
RETURNs. The problem is, thereafter attempts on my part to enter the GOSUB
routines via striking a function key are unsuccessful. It does not appear that
the function has been disabled; issuing a KEY ON does not seem to resolve the
problem. Is this a problem others have experienced?
If you've reset the ON KEY assignments in your GOSUBs, you have to reset them
again on the return to get the original assignments back. It might be better
to keep the Function key assignments to those originally set and branch to
menus (i.e. ON X GOTO or GOSUB), that should preserve your original Function
key assignments. Hope that'll work with your program. –jam
Thanks much for your help. I'm a bit embarrassed, as I seem to have caught
myself in a tyro's error. I can only plead inexperience with Microsoft BASIC.
It turns out my problem was not with the ON KEY statement at all. Prior to
attempting to reexecute a function key call, execution had entered an ON ERROR
routine and I did not know about the RESUME statement. It appears that ON KEY
statements are masked out during an ON ERROR routine. Ah, well! Hopefully my
next question will be a little more challenging. Thanks again!