home *** CD-ROM | disk | FTP | other *** search
/ Black Box 4 / BlackBox.cdr / autocad / acadtut.arj / LESS4.EXE / TEST4.LSP < prev   
Encoding:
Lisp/Scheme  |  1990-05-09  |  2.0 KB  |  69 lines

  1. ;lesson4 lisp routine to check answers to CAD lesson #4
  2.  
  3. (defun c:answers ()
  4. (prompt "\nPLEASE READ QUESTION #1 BEFORE ANSWERING")
  5. (setq ans1 (strcase(getstring "\nENTER YOUR ANSWER TO QUESTION #1" )))
  6. (if (= ans1 "DIMPOST")
  7.     (PROGN(command "text" "1,5.1" "" ans1 )
  8.           (command "insert" "ok" "8.08,6.5" "" "" ""))   
  9.            (PROGN(command "text" "1,5.1" "" ans1 )
  10.            (command "insert" "bad" "8.08,6.5" "" "" "")))
  11. (REDRAW)
  12. (Q2)
  13. );end defunQ1
  14.  
  15.  
  16.  
  17. (defun q2 ()
  18. (prompt "\nPLEASE READ QUESTION #2 BEFORE ANSWERING")
  19. (setq ans2a (strcase(getstring "\nENTER YOUR FIRST ANSWER TO QUESTION #2 ")))
  20. (setq ans2b (strcase(getstring "\nENTER YOUR SECOND ANSWER TO QUESTION #2 ")))
  21. (if 
  22.    (AND (or (= ans2a "DIMSE1") 
  23.          (= ans2a "DIMSE2")
  24.      (or (= ans2b "DIMSE1")  
  25.          (= ans2b "DIMSE2")
  26.       ))
  27.    )
  28.          (PROGN(command "text" "1,4.5" "" ans2a )
  29.                (command "text" "2,4.5" "" ans2b )
  30.           (command "insert" "ok" "8.08,6" "" "" ""))   
  31.            (PROGN(command "text" "1,4.5" "" ans2a )
  32.                  (command "text" "2,4.5"  "" ans2b)
  33.            (command "insert" "bad" "8.08,6" "" "" "")))
  34. (REDRAW)
  35. (q3)
  36. );end defunQ2
  37.  
  38.  
  39. (defun q3 ()
  40. (prompt "\nPLEASE READ QUESTION #3 BEFORE ANSWERING")
  41. (setq ans3 (strcase(getstring "\nENTER YOUR ANSWER TO QUESTION #3 ")))
  42. (if (= ans3 "B") (PROGN(command "text" "1,3.9" "" ans3 )
  43.           (command "insert" "ok" "8.08,5.5" "" "" ""))   
  44.            (PROGN(command "text" "1,3.9" "" ans3 )
  45.            (command "insert" "bad" "8.08,5.5" "" "" "")))
  46. (REDRAW)
  47. (PROMPT "\nPLEASE COMPLETE TASK IN QUESTION #4")
  48. (PROMPT "\nTHEN TYPE <CONT5> WHEN INSTRUCTED TO DO SO IN THE INSTRUCTIONS")
  49. );end defun q3
  50.  
  51.  
  52.  
  53.  
  54. (defun c:cont5 ()
  55. (command "insert" "closing" "3.27,6.39" "" "" "")   
  56. (REDRAW)
  57. (command "end" )
  58. );end defun5
  59. ;______________________________________________________
  60.  
  61.  
  62.  
  63. (defun c:ldl ()
  64. (load"lesson4")
  65. )
  66. (defun c:el ()
  67. (command "blue" "lesson4.lsp" )
  68. )
  69.