home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #19 / NN_1992_19.iso / spool / comp / lang / lisp / mcl / 1323 < prev    next >
Encoding:
Text File  |  1992-08-26  |  2.3 KB  |  66 lines

  1. Newsgroups: comp.lang.lisp.mcl
  2. Path: sparky!uunet!math.fu-berlin.de!fauern!dec16!wina65.informatik.uni-wuerzburg.de!user
  3. From: poeck@informatik.uni-wuerzburg.de (karsten poeck)
  4. Subject: Re: files-in-directory
  5. Message-ID: <poeck-270892100801@wina65.informatik.uni-wuerzburg.de>
  6. Followup-To: comp.lang.lisp.mcl
  7. Sender: news@informatik.uni-wuerzburg.de (USENET News account)
  8. Organization: university of wuerzburg
  9. References: <EeafXB200iUx4_kZIQ@andrew.cmu.edu>
  10. Date: Thu, 27 Aug 1992 08:07:43 GMT
  11. Lines: 53
  12.  
  13. In article <EeafXB200iUx4_kZIQ@andrew.cmu.edu>, sr0o+@andrew.cmu.edu
  14. (Steven Ritter) wrote:
  15. > I have just moved to a quadra, so I'm moving from MCL 1.3.2 to 2.0
  16. > (beta). Some of my code uses a function called files-in-directory, which
  17. > returns a list of files in the specified directory. I can't find
  18. > anything similar in 2.0. Is there an equivalent? Are there lots of other
  19.  
  20. Try
  21.  
  22. (defun b=erzeuge-String (irgendetwas)
  23.   "Ausgabe: macht aus irgendwas einen String, nil wird zu \"\""
  24.   ;Autor: Karsten
  25.   (cond   ((keywordp irgendetwas)(format nil "~s" irgendetwas))
  26.           ((null irgendetwas) "")
  27.           ((symbolp irgendetwas) (string irgendetwas))
  28.           ((stringp irgendetwas) irgendetwas)
  29.           ((typep irgendetwas 'Character)(string irgendetwas))
  30.           (t (format nil "~a" irgendetwas))))
  31.  
  32.  
  33. (defun b=konkateniere-nach-String (&rest Parameter)
  34.   "Eingabe: Beliebig viele Parameter vom beliebigen Typ
  35.   Ausgabe: Konkatenierter String"
  36.   ;Autor: Karsten        
  37.   (reduce #'(lambda(a b)
  38.              (concatenate `string a b))
  39.           (mapcar #'(lambda(was)
  40.                      (if (stringp was)
  41.                        was
  42.                        (b=erzeuge-string was)))
  43.                   parameter)))
  44.  
  45. (defun files-in-directory (was)
  46.   (directory (b=konkateniere-nach-string was "*")
  47.              :files t
  48.              :directories nil))
  49.  
  50. (defun directories-in-directory (was)
  51.   (directory (b=konkateniere-nach-string was "*")
  52.              :files nil
  53.              :directories t))
  54.  
  55. > differences between 1.3.2 and 2.0? Sorry I don't have any documentation
  56. The whole window package is different,  object lisp is replaced by clos
  57. cltl1 is replaced by cltl2
  58. > -- CMU has a site license. Also, does the final version of 2.0 run on
  59. > the quadra with the cache on?
  60. YES, fine
  61. > Steve
  62.  
  63. Karsten
  64.