(William) Wenjie Wang wrote:
-----Original Message-----
From: Wagner, David --- Senior Programmer Analyst --- WGO
[mailto:[EMAIL PROTECTED]
Sent: Thursday, 18 December 2003 4:41 AM
To: James Edward Gray II; Steve Massey
Cc: [EMAIL PROTECTED]
Subject: RE: Term:ANSIColor and negative numbers


James Edward Gray II wrote:


On Dec 17, 2003, at 11:25 AM, Steve Massey wrote:


Hi All

using Term:ANSIColor - does anyone know if it's possible ( or maybe
I mean practical) to print out negative numbers in say RED, at the
same time ensuring the original value is retained.

so if value is -16 the it should print 16 in RED text otherwise
leave it alone.

How do you get it to actually do the color? I use both std command( w2k) and older version os MKS Korn shell and all I get is numbers. Never understood how one actually gets the colors etc.

What does one need to do?



I'm using perl5.08 on Win2k box, and have faced the same problem in my DOS prompt window. There is no color changes, but some escape sequence was displayed instead. If I execute the sample code provided by James, I got "?[31m16?[0m" displayed instead of "16" in red color.

But I do have red colored 16 displayed properly, if execute it from cgywin's
bash shell.

I'm presuming it got something to do with the configuration?

I believe that you need to load ANSI.SYS in your CONFIG.SYS in order to have the escape sequences interpreted in a DOS session.


--
Andrew Gaffney


-- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>




Reply via email to