| C语言库函数(D类字母) |
|
| 作者:未知 文章来源:网络收集 点击数: 更新时间:2006-3-29 15:22:24
|
函数名: delay 功 能: 将程序的执行暂停一段时间(毫秒) 用 法: void delay(unsigned milliseconds); 程序例: /* Emits a 440-Hz tone for 500 milliseconds */ #include int main(void) { sound(440); delay(500); nosound();
return 0; }
函数名: delline 功 能: 在文本窗口中删去一行 用 法: void delline(void); 程序例:
#include
int main(void) { clrscr(); cprintf("The function DELLINE deletes \ the line containing the\r\n"); cprintf("cursor and moves all lines \ below it one line up.\r\n"); cprintf("DELLINE operates within the \ currently active text\r\n"); cprintf("window. Press any key to \ continue . . ."); gotoxy(1,2); /* Move the cursor to the second line and first column */ getch();
delline(); getch();
return 0; }
函数名: detectgraph 功 能: 通过检测硬件确定图形驱动程序和模式 用 法: void far detectgraph(int far *graphdriver, int far *graphmode); 程序例:
#include #include #include #include
/* names of the various cards supported */ char *dname[] = { "requests detection", "a CGA", "an MCGA", "an EGA", "a 64K EGA", "a monochrome EGA", "an IBM 8514", "a Hercules monochrome", "an AT&T 6300 PC", "a VGA", "an IBM 3270 PC" };
int main(void) { /* returns detected hardware info. */ int gdriver, gmode, errorcode;
/* detect graphics hardware available */ detectgraph(&gdriver, &gmode);
/* read result of detectgraph call */ errorcode = graphresult(); if (errorcode != grOk) /* an error occurred */ { printf("Graphics error: %s\n", \ grapherrormsg(errorcode)); printf("Press any key to halt:"); getch(); exit(1); /* terminate with an error code */ }
/* display the information detected */ clrscr([1] [2] [3] [4] [5] 下一页
|
|
[ 收藏此页到: 天天|和讯|博采|ViVi|狐摘|我摘|天极 ] 文章录入:kinda 责任编辑:kinda |
|
上一篇文章: C语言库函数(C类字母) 下一篇文章: C语言库函数(E类字母) |
| 【字体:小 大】【发表评论】【加入收藏】【告诉好友】【打印此文】【关闭窗口】 |