home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #16 / NN_1992_16.iso / spool / comp / lang / lisp / mcl / 1083 < prev    next >
Encoding:
Text File  |  1992-07-27  |  1.5 KB  |  42 lines

  1. Path: sparky!uunet!olivea!apple!apple!cambridge.apple.com!straz@cambridge.apple.com
  2. From: straz@cambridge.apple.com (Steve Strassmann)
  3. Newsgroups: comp.lang.lisp.mcl
  4. Subject: another error in my tiny test program
  5. Message-ID: <9207271522.AA28958@cambridge.apple.com>
  6. Date: 27 Jul 92 16:58:41 GMT
  7. Sender: info-mcl-request@cambridge.apple.com
  8. Lines: 29
  9. Approved: comp.lang.lisp.mcl@Cambridge.Apple.C0M
  10. Full-Name: Steve Strassmann
  11. Original-To: info-mcl
  12.  
  13. Date: Mon, 27 Jul 1992 11:36:29 -0500
  14. To: Steve Strassmann <straz@cambridge.apple.com>
  15. From: bill@cambridge.apple.com (Bill St. Clair)
  16. Subject: Re: Error in my tiny test program
  17.  
  18. >(defun drop-ball (&optional (window *window*))
  19. >  (let ((v 1)               ; vertical position
  20. >        (h 1)               ; horizontal position
  21. >        (size 10)           ; size of ball
  22. >        (height 20))        ; initial height of ball
  23. >    (while (< height 120)
  24. >      (if (oddp h) 
  25. >        (visible window)
  26. >        (invisible window))
  27. >      (paint-oval window h v (+ h size) (+ v size))
  28. >      (setf v (+ v 3) 
  29. >            h (+ h 5)
  30. >            height (+ height v)))))
  31.  
  32. I have to thank Bill for pointing out some bugs in my
  33. last message.
  34.  
  35. The WHILE macro is not part of CLtL2. It is available
  36. in MCL 2.0 in the CCL package, but it is not exported.
  37. So, if you want to use it, you have to say CCL::WHILE.
  38.  
  39. Also, PAINT-OVAL is part of the QUICKDRAW example file. 
  40. You either need to (require "QUICKDRAW") or use the
  41. #_paintoval trap directly.
  42.