вторник, 29 октября 2019 г., 2:52:48 UTC+3 пользователь NewLogoUser написал:
Hi NewLogoUser
I've tested the code with 3 differently created files under Windows:
* a file created using Notepad.exe, as you did. The file name is phonelist_notepad
* a file created using built-in UCBLogo editor. The file name is phonelist_ledit
You can create one with EDITFILE command.
e.g. editfile "c://ucblogo//phonelist_ledit
* a file created using Emacs for Windows. The file name is phonelist_emacs
Here is my UCBLogo session with the code and the files:
Welcome to Berkeley Logo version 6.0(206)
? edit
? setprefix "c://local//ucblogo//
? extract "brian "phonelist_ledit
Brian Harvey 555-2368
Brian Silverman 555-5274
? extract "brian "phonelist_notepad
Brian Havrey 555-2368
? extract "brian "phonelist_emacs
Brian Harvey 555-2368
Brian Silverman 555-5274
As you can see I've got proper extract both from phonelist_ledit and phonelist_emacs files.
But extract from phonelist_notepad consists the only one line, the same as in your listing.
A possible reason for the problem is the way how Notepad.exe handles CR and EOF flags.
So to avoid such type of problems, I recommend using UCBLogo built-in editor or Emacs for Windows instead of Notepad.exe.
Hope this will help.
And best of luck with CSLS. It is definitely worth the effort!
Regards
Alexey