iamien
10-30-02, 17:37
Ok learning C atm
I'm trying to apply escape squences to do things like clear the screen, but i cannot seem to get it to work
#include <stdio.h>
void main(void)
{
printf(" \033[2J"); /* tried it using octal, no luck */
printf("Esc[2J"); // tried it using plain esc, no dice
}
Thats what i figured it should be like to clear the screen but my result using octal is an arrow pointing left followed by [2J and for normal is Esc[2J.
What am i doing wrong :) while this in itself may seem trivial, i dont want to move on in book until i figure out how to make these work.
I have loaded the ANSI Decive drivers into system by adding DEVICE=C:\DOS\ANSI.SYS
too config.sys
Thanks
I'm trying to apply escape squences to do things like clear the screen, but i cannot seem to get it to work
#include <stdio.h>
void main(void)
{
printf(" \033[2J"); /* tried it using octal, no luck */
printf("Esc[2J"); // tried it using plain esc, no dice
}
Thats what i figured it should be like to clear the screen but my result using octal is an arrow pointing left followed by [2J and for normal is Esc[2J.
What am i doing wrong :) while this in itself may seem trivial, i dont want to move on in book until i figure out how to make these work.
I have loaded the ANSI Decive drivers into system by adding DEVICE=C:\DOS\ANSI.SYS
too config.sys
Thanks