Groups | Search | Server Info | Login | Register
Groups > comp.lang.logo > #103
| Newsgroups | comp.lang.logo |
|---|---|
| Date | 2019-10-28 16:52 -0700 |
| Message-ID | <7a69c7e7-04f6-40d8-a93a-e606190c4e92@googlegroups.com> (permalink) |
| Subject | Trouble reading from file |
| From | NewLogoUser <1001firstlast@gmail.com> |
I'm working my way through Computer Science Logo Style using UCB Logo 6.0 on Win10 One of the examples is the extract procedure, on this page: https://people.eecs.berkeley.edu/~bh/v2ch1/files.html My problem is that it will only read one line from the file. I made the sample file using Notepad.exe with 2 entries separated by a hard return (the ENTER) key. Here's the procedure and the sample case: to extract :word :file openread :file setread :file extract1 :word setread [] close :file end to extract1 :word local "line if eofp [stop] make "line readlist if memberp :word :line [print :line] extract1 :word end ? extract "brian "phonelist Brian Harvey 555-2368 Brian Silverman 555-5274 My sample file had the 2 Brian lines but only the first one is retrieved. Any ideas what's going on? - Thanks
Back to comp.lang.logo | Previous | Next — Next in thread | Find similar
Trouble reading from file NewLogoUser <1001firstlast@gmail.com> - 2019-10-28 16:52 -0700 Re: Trouble reading from file Alexey Slyusar <aleksey.slyusar@gmail.com> - 2019-11-05 01:56 -0800
csiph-web