Terminal control/Coloured text: Difference between revisions
Content deleted Content added
Add a Common Lisp example using ncurses |
|||
Line 355: | Line 355: | ||
GOBACK |
GOBACK |
||
.</lang> |
.</lang> |
||
=={{header|Common Lisp}}== |
|||
==={{header|ncurses}}=== |
|||
To interface the ncurses C library from Lisp, the ''croatoan'' library is used. |
|||
<lang lisp>(defun coloured-text () |
|||
(with-screen (scr :input-blocking t :input-echoing nil :cursor-visible nil) |
|||
(dolist (i '(:red :green :yellow :blue :magenta :cyan :white)) |
|||
(add-string scr (format nil "~A~%" i) :fgcolor i)) |
|||
(refresh scr) |
|||
;; wait for keypress |
|||
(get-char scr)))</lang> |
|||
=={{header|D}}== |
=={{header|D}}== |