From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII X-Google-Thread: fee84,9a2a420ec841e44c X-Google-Attributes: gidfee84,public From: Tobias Ernst Subject: Re: Dec C pecularity Date: 1999/06/13 Message-ID: <87hfocxypx.fsf@romulus.bland.fido.de>#1/1 X-Deja-AN: 489037443 Sender: tobi@romulus.bland.fido.de References: <37614C91.3FBFAB0A@zk3.dec.com> Organization: Comp.Center (RUS), U of Stuttgart, FRG Newsgroups: comp.unix.osf.osf1 Hello, seeing that you really seem to care about removing Dec C peculiarities, there is another one which has bothered me numerous times: #include int main(void) { printf ("\x1B[2JThe screen is cleared.\n"); return 0; } Gnu C can recognise "\x1B" as a way of encoding the character with charactercode 0x1B (27, the escape character, here used to produce an ANSI/VT100 sequence to clear the screen) into the string. Numerous other compilers (esp. in the Dos/Windows world) also do. Dec C won�t, and the problem is that Dec C does not even give a warning, so programs that use it may fail very subtly at run time. The way to code the above sequence on Dec C is to use octal notation, "\033", or to use %c and give the desired number as argument. Regards, Tobias.