Terminal control/Dimensions: Difference between revisions
Add a Common Lisp example using ncurses
SqrtNegInf (talk | contribs) m (→{{header|Sidef}}: Fix link: Perl 6 --> Raku) |
(Add a Common Lisp example using ncurses) |
||
Line 187:
GOBACK
.</lang>
=={{header|Common Lisp}}==
==={{header|ncurses}}===
To interface the ncurses C library from Lisp, the ''croatoan'' library is used.
<lang lisp>(defun screen-dimensions ()
(with-screen (scr :input-blocking t :input-echoing nil :cursor-visible nil)
(let ((width (width scr))
(height (height scr)))
(format scr "The current terminal screen is ~A lines high, ~A columns wide.~%~%" height width)
(refresh scr)
;; wait for keypress
(get-char scr))))</lang>
=={{header|Euphoria}}==
|