Common lisp interface to bearlibterminal https://bitbucket.org/cfyzium/bearlibterminal. Created with https://github.com/rpav/cl-autowrap.

hello-name.lisp 408B

12345678910111213
  1. (in-package :bearlibterminal-examples)
  2. (defun hello-name (&key (delay 5000))
  3. "Ask for your name, display, then close after delay seconds"
  4. (terminal-open)
  5. (terminal-print 1 1 "What is your name?")
  6. (terminal-refresh)
  7. (let ((name (terminal-read-str 1 2 256)))
  8. (terminal-print 1 3 (format nil "Hello ~A! Nice to meet you!" name)))
  9. (terminal-refresh)
  10. (terminal-delay delay)
  11. (terminal-close))