??? 05/14/07 15:06 Modified: 05/14/07 15:09 Read: times |
#139225 - Are DEL and BS equivalent ??? Responding to: ???'s previous message |
Frieder said:
not sure if DEL would make sense on all terminals. But you could offer DEL and BS.
Currently DEL (0x7f) would not be interpreted as delete and instead ignored. Probably not intended. Maybe treat DEL like BS (both echo themselves back to the terminal and remove previous char (if any) from buffer)? Hmm. I don't know enough about all the various terminals to know if this makes sense or not either. Are BS and DEL even equivalent? Anyone? Another big problem with the spec is that it assumes the caller to ReceiveString has nothing better to do than wait for the user input. Instead of putting the polling loop within ReceiveString, maybe it should always return immediately. Instead of the status codes NO_ERROR or BUFFER_OVERFLOW, it would return something like NO_DATA_YET, HAVE_NEW_DATA, or BUFFER_OVERFLOW. That way the polling loop could be within the caller, and the caller could be doing other things while waiting for the data. There are a million ways to skin a cat. Maybe this is why the term "reusable code" is a bit of an oxymoron. -- Russ |