Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Lol, Scheme

Name: Anonymous 2007-08-25 16:45 ID:132hQDyN

(define i (open-input-file "in.txt"))
(define o (open-output-file "out.txt"))
(define (bbc)
  (if (eof-object? (peek-char i))
      (begin (newline o) (close-output-port o))
      (case (peek-char i)
        ((#\<) (display #\[ o) (bbc))
        ((#\>) (display #\] o) (bbc))
        (else (display (read-char i) o)))))


This is supposed to be an EXPERT BBCODE UTILITY to convert HTML tags to BBCode, but when I run it, it never stops. I am only a beginner, but I've analysed it and noticed no errors. A little help here?

Name: Anonymous 2007-08-25 21:25 ID:IDLg2RtP

$ php -r "file_put_contents("out.txt",str_replace(array("<",">"),array("[","]"),file_get_contents("in.txt")));"

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List