Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.forth > #31097

Re: COLORS

Path csiph.com!usenet.pasdenom.info!aioe.org!.POSTED!not-for-mail
From "Rod Pemberton" <dont_use_email@xnothavet.cqm>
Newsgroups comp.lang.forth
Subject Re: COLORS
Date Sat, 31 May 2014 18:00:40 -0400
Organization Aioe.org NNTP Server
Lines 37
Message-ID <op.xgqvfeo46zenlw@localhost> (permalink)
References <7b87e201-c207-4c3a-8034-0b96190345db@googlegroups.com> <b8bd00b6-df6f-4868-95c8-db4c43e44f4d@googlegroups.com>
NNTP-Posting-Host CNsg4fVcCsvs3UaOgZtQCw.user.speranza.aioe.org
Mime-Version 1.0
Content-Type text/plain; charset=iso-8859-1; format=flowed; delsp=yes
Content-Transfer-Encoding 7bit
X-Complaints-To abuse@aioe.org
User-Agent Opera Mail/12.16 (Linux)
X-Notice Filtered by postfilter v. 0.8.2
Xref csiph.com comp.lang.forth:31097

Show key headers only | View raw


On Sat, 31 May 2014 16:52:42 -0400, Mark Wills <markwills1970@gmail.com>  
wrote:
> On Saturday, 31 May 2014 18:45:43 UTC+1, Jason Damisch  wrote:

>> COLORS  NORMAL  INVERSE  RED  BLUE  LIGHT-BLUE  PINK  YELLOW
>> LIGHT-GREEN  DARK-RED  DARK-GREEN  DARK-YELLOW  DARK-BLUE
>> PURPLE  TURQUOISE  LIGHT-GREY GREY
>>
>
> Yeah, that's really cute! What does ATTRIBUTE do?

It probably sets the console foreground text color, or perhaps
the text background color instead, but most likely the foreground.

Obviously, I'm not sure where those are defined in a Forth
environment, or if they are normally, i.e., therefore the
need for the Forth word COLORS.

FYI, I can tell you where the C functions are located in case
you need to consult them or use them:

For DOS C, some C compilers have pre-defined arrays for
the foreground and/or background colors.  If they're defined,
they're DOS functions, i.e., #include <conio.h>.  Consult
your compiler's documentation for more info on the functions.

For Linux C, there is no pre-defined array of colors for foreground
or background text.  The colors are set via pdcurses functions, i.e.,
#include <curses.h> and 'gcc -lcurses'.  Type 'man ncurses" in a
console for the man page.  Linux is a bit more complicated than DOS.
For DOS, you can set the foreground or background text color
independently of the other.  With curses, you must set both at once.
That's fine for text, if the program was designed that way.  It's
not so good for colored text images or ASCII art.


Rod Pemberton

Back to comp.lang.forth | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

COLORS Jason Damisch <jasondamisch@yahoo.com> - 2014-05-31 10:45 -0700
  Re: COLORS humptydumpty <ouatubi@gmail.com> - 2014-05-31 11:26 -0700
  Re: COLORS Paul Rubin <no.email@nospam.invalid> - 2014-05-31 11:47 -0700
    Re: COLORS Julian Fondren <julian.fondren@gmail.com> - 2014-06-01 03:07 -0700
  Re: COLORS Mark Wills <markwills1970@gmail.com> - 2014-05-31 13:52 -0700
    Re: COLORS Jason Damisch <jasondamisch@yahoo.com> - 2014-05-31 13:56 -0700
      Re: COLORS albert@spenarnc.xs4all.nl (Albert van der Horst) - 2014-06-01 09:41 +0000
    Re: COLORS "Rod Pemberton" <dont_use_email@xnothavet.cqm> - 2014-05-31 18:00 -0400
      Re: COLORS "Elizabeth D. Rather" <erather@forth.com> - 2014-05-31 17:14 -1000
      Re: COLORS Julian Fondren <julian.fondren@gmail.com> - 2014-06-01 02:57 -0700
        Re: COLORS "Rod Pemberton" <dont_use_email@xnothavet.cqm> - 2014-06-02 00:30 -0400

csiph-web