student.lisp Unix DownloadWindows Download
;;;; This is a template for assessed exercise 1 for the MSc module on
;;;; Programming in Lisp, 1999-2000.
;;;
;;; $Id: student.lisp,v 1.1 2003/01/09 02:11:35 colin Exp $
;;;

;;; Make sure you are in the right package
;;;
(in-package :exercise)

;;; If you want the graphing support you can use mle1-clim but the
;;; final submission should just load mle1.  If you have made a copy
;;; of the file for use at home, say, you may want to change the path;
;;; however the submitted version should have this exact path.
;;;
;;; The EVAL-WHEN should be uncommented and edited if any libraries  are
;;; needed in order to execute the students' submissions
;;;
;;; (eval-when (:compile-toplevel :load-toplevel :execute)
;;;    (load "library-name")



;;; Now define the exercise.  This is mandatory.  Change the fields
;;; appropriately!
;;;
(define-exercise :ex1			;must be :EX1
    :author "A Random Student" ;your name
    :login-name "student"			;login name
    :defined-symbols (hello-world	;list of defined symbols, see below
		      add2)
    :nonworking-symbols ();list of non-fully-working bits
    :commented-symbols ()		;list of things commented below
    :commentary "my comments"
    ;; the rest are for marker's use only
    :load-error t
    :load-comment "OK, so there aren't actually any problems with load. 
But let's say there are and stick a comment in so we can see it print out when testing."
    :compile-error nil
    :compile-comment ""
    :other-comments "")

;;; The :DEFINED-SYMBOLS field should contain the names the functions
;;; and variables that you have defined *from those required* -- if you
;;; have defined other things, as auxiliary functions for instance,
;;; you shouldn't include them.
;;;
;;; If you have some definitions which do load & compile but which do
;;; not fully work, but which you wish to be taken into account, you
;;; should include them in DEFINED-SYMBOLS *and* NONWORKING-SYMBOLS.
;;;
;;; If you have things which are so nonworking they will not compile,
;;; incluse them as a comment in the file, and put them into
;;; COMMENTED-SYMBOLS, but *not* either of the other two.

;;; Remainder of exercise here.
;;;

(defun hello-world ()
  (princ "Hello World!")
  (terpri))


(defun add2 (num)
  (+ 2 num))