CommonLispTings/loginv2.lisp
2023-02-23 15:23:38 -05:00

21 lines
537 B
Common Lisp

(setq *print-case* :downcase)
(format t "Username: ")
(defvar *username* (read))
(format t "Password: ")
(defvar *password* (read))
(defvar *user* "sweatshirt")
(defvar *pass* "Daemons0!")
(defparameter *accounts* (list :key 1 :username 'sweatshirt :password 'Daemons0!))
(defparameter user (getf *accounts* :username))
(defparameter pass (getf *accounts* :password))
(if (and (eq *username* user) (eq *password* pass))
(progn
(format t "You are now logged in as, ~a" *username*))
(format t "Something went wrong."))