From: Mark Carter
Subject: Coloured text
Date: 
Message-ID: <43385e89$0$49011$14726298@news.sunsite.dk>
I'm using CLISP 2.34 on Windows XP.

Is there a way for me to print coloured text? I was thinking of trying 
to create a DOS-like interface using the SCREEN functionality. I've tried

(setq a (concatenate 'string (string #\Escape) "[31m hello"))
(format t  a)

hoping that it would print text in red, but it didn't work.
From: Pascal Bourguignon
Subject: Re: Coloured text
Date: 
Message-ID: <87fyrrj9ut.fsf@thalassa.informatimago.com>
Mark Carter <··@privacy.net> writes:

> I'm using CLISP 2.34 on Windows XP.
>
> Is there a way for me to print coloured text? I was thinking of trying
> to create a DOS-like interface using the SCREEN functionality. I've
> tried
>
> (setq a (concatenate 'string (string #\Escape) "[31m hello"))
> (format t  a)
>
> hoping that it would print text in red, but it didn't work.

On an xterm, it works well.

(format t  a) is as bad as printf(a);  what if a contains a ~ ?

Use: (format t "~a" a) or (princ a)

Have a look at:
cvs -z3 -d ··················@cvs.informatimago.com:/usr/local/cvs/public/chrooted-cvs/cvs co common/common-lisp/ecma048.lisp
http://www.informatimago.com/develop/lisp/   


-- 
__Pascal Bourguignon__                     http://www.informatimago.com/

Nobody can fix the economy.  Nobody can be trusted with their finger
on the button.  Nobody's perfect.  VOTE FOR NOBODY.