home *** CD-ROM | disk | FTP | other *** search
/ The World of Computer Software / World_Of_Computer_Software-02-385-Vol-1of3.iso / d / doslogo.zip / LOGOROOT.ZIP / OLDDIFF < prev    next >
Text File  |  1990-06-06  |  7KB  |  193 lines

  1. A Guide to LSRHS Logo Release 3, for people who knew Release 1
  2.  
  3. LSRHS Logo has been changed to be much faster and more robust.  It also
  4. is different in its user interface from the previous version, so that it
  5. more closely resembles Apple Logo.  Here are the most important changes:
  6.  
  7. 1.  The line number editor no longer exists.  There are two ways to define
  8. a procedure.  The "to" command lets you type in the procedure, somewhat as
  9. before, but without line numbers and with no correction facility.  The
  10. "edit" command runs edt so you can use the power of display editing.  You
  11. can use "edit" even if the procedure did not previously exist.
  12.  
  13. 2.  Most Logo procedures evaluate their inputs: if you want to use a
  14. particular word as an input you must quote it.  In old LSRHS Logo there
  15. were several exceptions: edit, erase, show, and describe all took as inputs
  16. an unquoted name of a procedure.  These procedures are no longer exceptional.
  17. You must say
  18.     edit "foo
  19. to edit the procedure foo, for example.  You can also give edit, erase, or
  20. show a list of procedures as inputs, which will apply them to all of the
  21. procedures you name at once.  It is particularly convenient sometimes to be
  22. able to edit two procedures at the same time.
  23.  
  24. Note: The "to" command is still exceptional in that it doesn't evaluate
  25. its inputs.
  26.  
  27. 3.  The "edit" command with no input at all will re-edit whatever you edited
  28. last time.  It remembers the buffer file as long as you stay in Logo.
  29.  
  30. 4.  If you are editing with "edit" and change your mind, so you don't want to
  31. redefine any procedures, leave edt with ESC ^Z instead of just ^Z.  This will
  32. tell Logo not to change the procedure definitions.  (This is only true at
  33. LSRHS, or wherever the text editor cooperates by setting a nonzero exit
  34. status.)
  35.  
  36. 5.  You can put comments on a Logo instruction line by starting the comment
  37. with an exclamation point:
  38.     print "foo ! This is a comment.
  39. The exclamation point must not be part of a word or list, which is why there
  40. is a space before it in the example.
  41.  
  42. 6.  The "if" command syntax is completely different.  It, too, used to be an
  43. exception to the rule about quoting inputs.  It now takes either two or three
  44. inputs.  The first is a predicate, as before.  The second and third are lists
  45. of instructions, as in the repeat command:
  46.     if 2=3 [print "yes] [print "no]
  47. The second input is executed if the predicat is true, the (optional) third
  48. if it's false.  If the things in the second and third inputs are expressions
  49. rather than complete instructions, "if" can be used as an operation:
  50.     print if 2=3 ["yes] ["no]
  51. The third input is required in that case.
  52.  
  53. The difference in "if" is likely to be the biggest headache to people used to
  54. the old way.  Your Logo procedures must be changed like this:
  55.     old:    if :num=0 stop
  56.     new:    if :num=0 [stop]
  57.  
  58. 7.  Many abbreviations are removed or changed:
  59.     sentence    s -> se
  60.     print        p -> pr
  61.     goodbye        g -> bye
  62.  
  63.     gone completely: ei, gp, lp, rq, pro, q, w, eq, ep, np, wp,
  64.     c, th, na, lo, m, sp, zp, ti, d, t, ut.
  65.  
  66. 8.  Some synonyms are added to be like Apple Logo:
  67.     full        fullscreen
  68.     split        splitscreen
  69.     text        textscreen
  70.     atan        arctan
  71.     either        or
  72.     both        and
  73. The old names still work also.
  74.  
  75. 9.  The procedures repeat, nth (synonym item), and memberp, which were
  76. library procedures written in Logo before, are now primitives, so they're
  77. faster.  NOTE: The order of the inputs to repeat has been reversed:
  78.     repeat 4 [fd 40; rt 90]
  79.  
  80. 10.  Lots of bugs have been fixed.  In particular, several limitations on
  81. repeat (and run) have been removed: You can have a repeat within a repeat,
  82. multiple instructions within a repeat, etc.
  83.  
  84. New in Release 3 (compared to Release 2):
  85.  
  86. 11.  There is now a pause facility, which allows you to enter interactive
  87. commands in the context of a running procedure, to examine or modify local
  88. variables.  This happens, among other things, when you type the system
  89. interrupt character (^C at LSRHS).  Typing the quit character (^G at LSRHS)
  90. does what it always did, namely stop all procedures.
  91.  
  92. 12.  Turtle commands like forward do an automatic turtle "display if
  93. you don't already have a turtle.
  94.  
  95. 13.  New primitives:
  96.  
  97. (Already in release 2):
  98.  
  99. readlist (abbrev rl)--
  100.     Like request but doesn't print a "?" prompt.
  101.  
  102. int--
  103.     Takes one numeric input, gives integer part (truncates).
  104.  
  105. round--
  106.     Takes one numeric input, gives nearest integer (rounds).
  107.  
  108. ascii--
  109.     Takes a single-character word, gives the numeric code for that char.
  110.  
  111. char--
  112.     Takes a number, gives the corresponding character.
  113.  
  114. oflush--
  115.     Command, no inputs.  Use this to make stuff you've printed actually
  116.     get printed right away.  Normally, what you print is buffered until
  117.     you have to type in something.
  118.  
  119. pprop, gprop, remprop, plist, pps--
  120.     Property lists.  Named properties can be associated with a word.
  121.     Examples:
  122.  
  123.         pprop "bh "firstname "Brian
  124.         pprop "bh "lastname "Harvey
  125.         print gprop "bh "firstname
  126.             -> Brian
  127.         fprint plist "bh
  128.             -> [firstname Brian lastname Harvey]
  129.         pps
  130.             -> bh's firstname is Brian
  131.                bh's lastname is Harvey
  132.         remprop "bh "lastname
  133.  
  134. test, iftrue (abbrev ift), iffalse (abbrev iff)--
  135.     An alternate form of "if":
  136.  
  137.         test 2=3
  138.         iftrue [print "foo]
  139.         iffalse [print "baz]
  140.  
  141.     These are most useful if you have several instructions all conditional
  142.     on the same test.  You can use any number of iftrue and iffalse
  143.     commands, in any order.  The result of "test" is remembered locally
  144.     for each procedure.
  145.  
  146. New in Release 3 (compared to Release 2):
  147.  
  148. setscrunch, scrunch--
  149.     Set and get the aspect ratio, a number by which the vertical
  150.     component of turtle motion is multiplied.  Make squares really square.
  151.  
  152. wipeclean (clean)--
  153.     Like clearscreen, but don't move the turtle.
  154.  
  155. penreverse (px)--
  156.     A pen mode in which each dot in the turtle's path is turned on if
  157.     it was ff and vice versa.
  158.  
  159. penmode--
  160.     Outputs one of the words penup, pendown, penerase, or penreverse.
  161.  
  162. shownp--
  163.     Outputs true if the turtle is visible.
  164.  
  165. towardsxy--
  166.     Outputs the heading to which to turn the turtle in order for it
  167.     to face the point specified by the two inputs.
  168.  
  169. repcount--
  170.     Outputs how many times through the repeat we've done.  Try
  171.         repeat 10 [print repcount]
  172.         repeat 50 [fd 20+2*repcount; rt 90]
  173.  
  174. pause--
  175.     In a procedure, pause.  Accept commands from the terminal, but with
  176.     local variables available.
  177.  
  178. continue (co)--
  179.     Continue the procedure from which Logo paused.
  180.  
  181. errpause--
  182.     From now on, pause instead of stopping if an error happens inside
  183.     a procedure.
  184.  
  185. errquit--
  186.     From now on, quit on errors.
  187.  
  188. setipause--
  189.     From now on, interrupt (^C) pauses and quit (^G) stops.
  190.  
  191. setqpause--
  192.     From now on, quit (^G) pauses and interrupt (^C) stops.
  193.