guile-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

need help w/ "ERROR: bad recipient"


From: Matt Wette
Subject: need help w/ "ERROR: bad recipient"
Date: Sun, 19 Nov 2000 10:21:05 -0800 (PST)

OK, I'm stumped.  Does anyone see my error below?  I'm reading
through lines in a file to find the first line that matches a
particular RE.  -- Matt


mr-ed$ test3.scm
Backtrace:
0* (cond (#f # # # ...) (#t #))
1  [format:format #t "nelt-in-file: ~A~%" ...
2*  [mcs-nelt-in-file "lt1.in"]
3   (let* ((opts #) (port #) (n #f)) (cond (# #f) (#t # # n)))
4   (cond ((eq? #f port) #f) (#t (letrec (#) (iter #)) (close-port port) n))
5*  (letrec ((iter (lambda # #))) (iter (read-line port)))
6   [iter "% lt1.in - MACOS prescription file"]
7*  [cond (cond # # #) (# # # # ...)]

ERROR: In procedure cond in expression (iter (read-line port)):
ERROR: bad recipient

 ... where ...

(define (mcs-nelt-in-file file . opts)
  (let* ((opts (canonicalize-opts opts))
         (port (open-input-file file))
         (n #f)
         )
    (cond
     ((eq? #f port) #f)
     (else
      (let iter ((line (read-line port)))
        (cond
         ((eof-object? line) #f)
         ((regexp-exec nElt-re line)
          => (lambda (m) (set! n (match:substring m 1)))
          #f)
         (else
          (iter (read-line port)))))
      (close-port port)
      n))))





reply via email to

[Prev in Thread] Current Thread [Next in Thread]