Subject:
|
RE: IR problems
|
Newsgroups:
|
lugnet.robotics.rcx.pbforth
|
Date:
|
Fri, 30 Jan 2004 20:46:17 GMT
|
Reply-To:
|
<rhempel@bmts.com*spamcake*>
|
Viewed:
|
3796 times
|
| |
| |
> Ralph, one more question. Are there conditions where the word EKEY would wait
> for input (like KEY)? It seems to happen in my program.
EKEY always waits for input. Use EKEY? to see if anything is available...
Looking at the source, I see that there is a possiblity that in the time
between checking for a character with EKEY? and actually reading
it with EKEY, that an error can occur and casue EKEY to block even
though you think it should not.
You should always use EKEY? before EKEY, but traditional Forth does not
let you check for errors in EKEY so...
How should we handle this? I can make a new word that returns the actual
byte in the low order bits and additional info in the high byte...
If the high byte is 0, then there is no data.
What should we call the word?
Ralph
|
|
Message has 1 Reply: | | Re: IR problems
|
| (...) I did not explain my problem properly but you got it anyway! I do use EKEY? before EKEY, but sometimes EKEY seems to block. Thanks for taking your time to look into this. As for the new word (wow!), in Forth-79, there was a word called ?KEY (...) (21 years ago, 31-Jan-04, to lugnet.robotics.rcx.pbforth)
|
Message is in Reply To:
| | Re: IR problems
|
| (...) Ralph, one more question. Are there conditions where the word EKEY would wait for input (like KEY)? It seems to happen in my program. Thanks (21 years ago, 29-Jan-04, to lugnet.robotics.rcx.pbforth)
|
7 Messages in This Thread:
- Entire Thread on One Page:
- Nested:
All | Brief | Compact | Dots
Linear:
All | Brief | Compact
This Message and its Replies on One Page:
- Nested:
All | Brief | Compact | Dots
Linear:
All | Brief | Compact
|
|
|
|