main-example.lisp 511 B

123456789101112131415161718
  1. (in-package #:cffi-example)
  2. (defcfun "puts" :int
  3. "Put a string to standard output, return non-negative length output, or EOF"
  4. (string :string))
  5. (defun check-groveller ()
  6. (assert (equal (list +a0+ +a1+ +a2+ +a3+ +a4+) '(2 4 8 16 32)))
  7. (assert (equal (bn 1) 32)))
  8. (defun entry-point ()
  9. (when uiop:*command-line-arguments*
  10. (uiop:format! t "Arguments: ~A~%" (uiop:escape-command uiop:*command-line-arguments*)))
  11. (puts "hello, world!")
  12. (check-groveller)
  13. (uiop:finish-outputs)
  14. (uiop:quit 0))