let creates a variable in a local sense. set set's it as a global, correct? Please look at the following function.
Code: Select all
(define (read-segment fh)
(let ((buf "") (ch (char (read-char fh))))
(while (!= ch "~")
(push ch buf -1)
(set 'ch (char (read-char fh))))
(parse buf "*")))
What this function does is reads 1 segment at a time from an edi file which looks like:
Code: Select all
NAME*JOHN*DOE~ADDRESS*123 MAIN ST.*SMALLTOWN*COLORADO*USA~
Thanks,
Jeremy