putch('1');
}
}
main()
{
void border(int,int,int,int);
clrscr();
window(6,8,38,12);
border(6,8,38,12);
gotoxy(2,2);
printf("window 1");
window(8,16,40,24);
border(8,16,40,24);
gotoxy(3,2);
printf("window 2");
getch();
}
4. clreol() 清除光标行尾字符函数
功能: 函数 clreol()在当前字符窗口中清除从光标位置到行尾的所有字符,而光标位置保持不变。
用法: 它的调用方式为 void clreol(void);
说明: 此函数的相应头文件为 conio.h
返回值:无
例: 程序中使用了函数 clreol()和 clrscr()
#i nclude "conio.h>
void main()
{
register int i;
gotoxy(6,8);
printf("This is a test of the clreol() function.");
getch();
gotoxy(6,8);
clreol();
for(i=0;i<20;i++)
printf("Hello\n");
getch();
clrscr();
}
5. insline() 插入空行函数
功能: 函数 insline()插入一空行到当前光标所在行上,同时光标以下的所有行都向下顺移一行。
用法: 此函数的调用方式为 void insline(void);
说明: 该函数只用于文本方式,并且在当了符窗口才有效。
3