kbhit.txt
来自「dos 1.0 其中包含quick basic源代码、内存管理himem emm」· 文本 代码 · 共 49 行
TXT
49 行
SUMMARY kbhit zgetch
#include <tools.h>
int kbhit();
char zgetch();
DESCRIPTION
kbhit returns 0 if a character from the keyboard is available otherwise
non-zero is returned.
zgetch returns the next character typed. Input is NOT automatically echoed.
RETURN VALUE
IMPLEMENTATION
SEE ALSO
NOTE
EXAMPLE
#include <tools.h>
/* #include <stdio.h> is NOT needed for access to putchar from C library
* because including tools.h automatically includes <stdio.h>
*/
main(c, argv)
int c;
char *argv[];
{
char ch;
while (ch != 's') {
ch = '.';
if (!kbhit())
ch = zgetch();
putchar(ch);
}
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?