home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 13 / 13.iso / p / p067 / 1.img / HY / HY40.LSP < prev   
Encoding:
Text File  |  1988-02-11  |  959 b   |  31 lines

  1. (defun hj01 ()
  2.   (command "graphscr")
  3.   (setvar "cmdecho" 0)
  4.   (setq s 0)
  5.   (while (/= s ".")
  6.          (setq s (getstring "\n╩Σ╚δ▒φ┤∩╩╜╗≥<.> ╜ß╩°: "))
  7.          (if (/= s ".")
  8.              (progn (setq f (open "exp.dat" "w"))
  9.                     (setq len (strlen s))
  10.                     (setq n 1)
  11.                     (repeat len 
  12.                             (setq sub (substr s n 1))
  13.                             (if (= sub "x") (setq sub "*"))
  14.                             (write-line sub f)
  15.                             (setq n (1+ n))
  16.                     )
  17.                     (close f)
  18.                     (command "shell" "hdcal")
  19.                     (setq f (open "exp.res" "r"))
  20.                     (setq res (read-line f))
  21.                     (close f)
  22.                     (command "graphscr")
  23.                     (print res)
  24.             )
  25.             (print "end")
  26.          )
  27.    )
  28. (setq len nil str nil res nil)
  29. )
  30. (hj01)
  31.