Andrew Gaffney wrote:
(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.
Sorry, but when you say load, what do you mean? Sorry but unsure what is necessary and I would like to see this work.
Thanks for any input.
Well, in Windows 98 and below, you could add the line:
DEVICE=ANSI.SYS
to your C:\CONFIG.SYS and it would allow the command prompt to interpret ANSI escape sequences. Unfortunately, I do not know the equivelant for Windows NT/2K/XP.
-- 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>