HTBasic Help
×
Menu
Index

Read KBD$ Buffer

 
int kbdcrt_readkbd( char *buf, int max, int *len );
 
Where:
  buf - buffer pointer
  max - length of buf
  len - number of bytes read
 
Description
This routine returns the contents and then clears the KBD$ buffer. The characters are returned in the buffer pointed to by buf. It is not null terminated. The number of characters written is returned in len. The return value is either a zero indicating no errors or an HTBasic error code.
 
Specify the ON KBD statement before entering the CSUB. If you do not wish closure keys to block the keyboard input specify the ON KBD ALL option.
 
int  error;
int  len;
char buf[160];
error = readkbd( buf, 160, &len );
 
See Also
crtread