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

Re: do and read-line in MrEd.



[Reply-to set]

On Jul  2, Jordan Katz wrote:
> > |   ;; read until "Content-Type..." is met
> > |   (do ((line (read-line sin) (read-line sin)))
> > |       ((not (regexp-match html-start line))))
> > |         ^^^
> 
> This fixed it, but I don't understand why.  Isn't the loop supposed
> to execute until the test condition is false?

No, it's until it is true.  If you find `do' confusing, you could use
a named let instead.


> [...]
> But this will not work since the call to tcp-connect does not see
> url.  The most straight forward solution would be let-values* but
> that apparently doesn't exist in MzScheme.

It's `let*-values'.

-- 
          ((lambda (x) (x x)) (lambda (x) (x x)))          Eli Barzilay:
                  http://www.barzilay.org/                 Maze is Life!