'=========================================================================== ' Subject: COLOUR CODED WRITER Date: 08-09-97 (01:38) ' Author: Jason Lashua Code: QB, QBasic, PDS ' Origin: irox@gte.net Packet: TEXT.ABC '=========================================================================== DECLARE SUB cwrite (text$) ' Cwrite v1.o by jason lashua ' nice color code. ' just type cwrite "`15blah`07 heh" or something ' the colors are: ' dark bright name ' 00 08 black ' 01 09 blue ' 02 10 green ' 03 11 cyan ' 04 12 red ' 05 13 magenta ' 06 14 yellow ' 07 15 white ' ' All color codes are preceeded by an ` ' CLS LOCATE 10, 27 cwrite "`15w`13el`05come `15t`13o `15c`13wr`05ite`03!" LOCATE 11, 19 cwrite "`07D`15oesn`09'`15t text look beter `15l`07i`08ke `15t`07h`08is`09?" LOCATE 12, 25 cwrite "`11a`03n`08d `11i`03t`08's `11s`03o `11e`03a`08sy `11t`03o`08o!" SUB cwrite (text$) FOR i = 1 TO LEN(text$) a$ = MID$(text$, i, 1) IF a$ <> "`" THEN PRINT a$; IF a$ = "`" THEN b$ = MID$(text$, i + 1, 2) col = VAL(b$) COLOR col i = i + 2 END IF NEXT i END SUB