Discussion:
How to save and load LOGO programs
(too old to reply)
Chris
2004-04-28 11:02:32 UTC
Permalink
I've been playing with LOGO and found how to save and load programs.
Here's a step-by-step guide.
Please try the procedure and tell me if it works for you.

1. Launch LOGO.

2. Press EDALL button.

3. Type into the editor window so that it looks like this:

to chris1
fd 100 rt 91
end

to chris2
repeat 45 [chris1]
end

4. On the editor window click FILE - SAVE AND EXIT.

5. On the MSWLogo Screen window click FILE _ SAVE AS.

6. Save in My Documents, with the filename "chris" (without the quotes).

7. Close down LOGO.

8. Launch LOGO.

9. On the MSWLogo Screen window click FILE _ LOAD.

10. Click on the file "chris.LGO".

11. In the command line at the bottom of commander type "chris1" and
press enter.

12. In the command line at the bottom of commander type "chris2" and
press enter.


Now tell me - did it work as you expected?
Or do my instructions need improving?
--
Chris
Quentin Grady
2004-04-30 10:34:30 UTC
Permalink
G'day G'day Chris,

It worked fine for me. It is great when starting out to see nuances
different folks bring to their programs. I hadn't even considered
writing more than one routine before saving.

Thanks,

This post not CC'd by email
Post by Chris
I've been playing with LOGO and found how to save and load programs.
Here's a step-by-step guide.
Please try the procedure and tell me if it works for you.
1. Launch LOGO.
2. Press EDALL button.
to chris1
fd 100 rt 91
end
to chris2
repeat 45 [chris1]
end
4. On the editor window click FILE - SAVE AND EXIT.
5. On the MSWLogo Screen window click FILE _ SAVE AS.
6. Save in My Documents, with the filename "chris" (without the quotes).
7. Close down LOGO.
8. Launch LOGO.
9. On the MSWLogo Screen window click FILE _ LOAD.
10. Click on the file "chris.LGO".
11. In the command line at the bottom of commander type "chris1" and
press enter.
12. In the command line at the bottom of commander type "chris2" and
press enter.
Now tell me - did it work as you expected?
Or do my instructions need improving?
--
Quentin Grady ^ ^ /
New Zealand, >#,#< [
/ \ /\
"... and the blind dog was leading."

http://homepages.paradise.net.nz/quentin
Chris
2004-04-30 11:29:44 UTC
Permalink
Chris writes
Post by Chris
I've been playing with LOGO and found how to save and load programs.
Here's a step-by-step guide.
Please try the procedure and tell me if it works for you.
1. Launch LOGO.
2. Press EDALL button.
to chris1
fd 100 rt 91
end
to chris2
repeat 45 [chris1]
end
4. On the editor window click FILE - SAVE AND EXIT.
5. On the MSWLogo Screen window click FILE _ SAVE AS.
6. Save in My Documents, with the filename "chris" (without the quotes).
7. Close down LOGO.
8. Launch LOGO.
9. On the MSWLogo Screen window click FILE _ LOAD.
10. Click on the file "chris.LGO".
11. In the command line at the bottom of commander type "chris1" and
press enter.
12. In the command line at the bottom of commander type "chris2" and
press enter.
Now tell me - did it work as you expected?
Or do my instructions need improving?
It worked fine for me. It is great when starting out to see nuances
different folks bring to their programs. I hadn't even considered
writing more than one routine before saving.
Thanks for the feedback, Quentin.
I was teaching someone and she couldn't follow the instructions in the
tutorial - and so I wrote the above instructions to see if they helped.
Trouble is - you never know how clear your own instructions are - so
they really have to be validated.
If anyone wants to suggest changes or improvements then I will be very
open to them.
--
Chris
Quentin Grady
2004-05-01 04:52:48 UTC
Permalink
This post not CC'd by email
Post by Chris
Post by Quentin Grady
It worked fine for me. It is great when starting out to see nuances
different folks bring to their programs. I hadn't even considered
writing more than one routine before saving.
Thanks for the feedback, Quentin.
I was teaching someone and she couldn't follow the instructions in the
tutorial - and so I wrote the above instructions to see if they helped.
Trouble is - you never know how clear your own instructions are - so
they really have to be validated.
If anyone wants to suggest changes or improvements then I will be very
open to them.
--
Chris
G'day G'day Chris,

I am a total newbie in this field so it is important for me that
instructions are complete and easy to follow. Thirty five years of
teaching experience has taught me that it is worth while going through
one's manuals every time a student asks for an explanation of an
instruction. I found intelligent, competent adults regressed their
reading age to about 12 to 14 when confronted with work place math.
The improvement in confidence and level of achievement was marked over
a couple of years.

Best wishes,
--
Quentin Grady ^ ^ /
New Zealand, >#,#< [
/ \ /\
"... and the blind dog was leading."

http://homepages.paradise.net.nz/quentin
Quentin Grady
2004-05-03 05:51:04 UTC
Permalink
G'day G'day Chris,

I discovered on quirk you may find undesirable with the method.

Lets say you wrote

to first_routine
blah blah blah blah
end

to middle_routine
blah blah
end

to end_routine
blah blah blah
end

and stored them by the method suggested, when they are reloaded they
come back as

to end_routine
blah blah blah
end

to first_routine
blah blah blah blah
end

to middle_routine
blah blah
end

because the routines are sorted in alphabetical order.
Don't know why.

Best wishes,
This post not CC'd by email
Post by Chris
I've been playing with LOGO and found how to save and load programs.
Here's a step-by-step guide.
Please try the procedure and tell me if it works for you.
1. Launch LOGO.
2. Press EDALL button.
to chris1
fd 100 rt 91
end
to chris2
repeat 45 [chris1]
end
4. On the editor window click FILE - SAVE AND EXIT.
5. On the MSWLogo Screen window click FILE _ SAVE AS.
6. Save in My Documents, with the filename "chris" (without the quotes).
7. Close down LOGO.
8. Launch LOGO.
9. On the MSWLogo Screen window click FILE _ LOAD.
10. Click on the file "chris.LGO".
11. In the command line at the bottom of commander type "chris1" and
press enter.
12. In the command line at the bottom of commander type "chris2" and
press enter.
Now tell me - did it work as you expected?
Or do my instructions need improving?
--
Quentin Grady ^ ^ /
New Zealand, >#,#< [
/ \ /\
"... and the blind dog was leading."

http://homepages.paradise.net.nz/quentin
Brian Harvey
2004-05-03 17:47:47 UTC
Permalink
Post by Quentin Grady
to first_routine
to middle_routine
to end_routine
and stored them by the method suggested, when they are reloaded they
come back as
to end_routine
to first_routine
to middle_routine
because the routines are sorted in alphabetical order.
Don't know why.
This is another area in which different dialects behave differently.

SAVE saves a workspace -- all procedures, variables, and (in some versions)
property lists. The things in the workspace were not necessarily all loaded
from a single file, or loaded at all; they might have been defined while a
program was running, for example. So there is no inherent order to them.
It would be possible for Logo to remember the order in which they were
defined, but that's unusual. Usually the definitions are kept internally
in essentially random order (namely, in a hash table). UCBLogo/MSWLogo
sorts them on SAVE on the theory that that's better than random order.

Some Logo dialects, such as Microworlds, don't have a workspace concept,
but instead maintain a text buffer into which you place all definitions.

If you prefer that style, you can do it in UCBLogo/MSWLogo by avoiding LOAD
and SAVE, and instead using the EDITFILE command. It takes a filename as
input, and edits that file. When you're done editing, you save the file in
the editor, then return to Logo, which (implicitly) loads the file. From
then on, you can just say EDIT (with no input) to edit the same file again.

Or, of course, if you're using a Unix-style operating system, you can just
edit with emacs, and run Logo inside an emacs window!

Loading...