Added username getting

This commit is contained in:
Abb1x 2021-03-20 20:34:18 -04:00
parent cda705d809
commit 3b57704ad9
1 changed files with 17 additions and 1 deletions

View File

@ -1 +1,17 @@
(format t "Hello! Welcome to the ~c[33mDuinocoin~c[0m lisp miner! ~%" #\ESC #\ESC)
(defvar username)
(defun get-username (prompt) ; utilities function to get username
(clear-input)
(write-string prompt)
(finish-output)
(setf username (read-line)))
(defun init()
(get-username "Enter username: ")
(format t "Hello ~c[32m~a~c[0m! Welcome to the ~c[33mDuinocoin~c[0m lisp miner! ~%" #\ESC username #\ESC #\ESC #\ESC)
)
(init)