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 / APPLEDIF next >
Text File  |  1990-06-06  |  5KB  |  90 lines

  1. A Guide to LSRHS Logo for people who know Apple Logo
  2.  
  3. Although the two versions of Logo are very different internally, they
  4. are fairly similar in the way you use them.  This guide assumes that
  5. you know all about Apple Logo, and explains the differences.  There are
  6. enough differences that you can't just run your Apple Logo programs
  7. unchanged, but what you know of Apple Logo will help you understand
  8. LSRHS Logo.  Read this along with the LSRHS Logo Manual.
  9.  
  10. 1.  Multi-instruction lines.  To put more than one Logo instruction on
  11. a line, you must use a semicolon between instructions:
  12.         print "foo; print "baz
  13.  
  14. 2.  Comments can be used, starting with exclamation point:
  15.         print "foo ! This is a comment
  16.  
  17. 3.  The procedure editor is edt, an EMACS dialect somewhat more complicated
  18. than the Apple Logo editor.  There is no edns primitive.
  19.  
  20. 4.  Differences in graphics:  LSRHS doesn't have background, dot,
  21. fence, pen, setbg, setpen, window, or wrap.  Instead of pencolor and
  22. setpc, there are somewhat different primitives setcolor and pencolor.  There
  23. is also setxy, which is like setpos but takes two scalar inputs instead
  24. of one vector.  Similarly, towardsxy takes two scalar inputs.
  25.  
  26. 5.  Differences in words and lists:  In addition to the Apple Logo primitives,
  27. LSRHS Logo has sentencep (true only if the input is a list of words, not a
  28. list of lists); is (like equalp, but true for numbers only if they are string
  29. equal, so "is 3.0 3" outputs false); memberp and item for words as well as
  30. lists.
  31.  
  32. 6.  Differences in use of variables:  LSRHS local takes only one input.
  33. There is no name, only make.
  34.  
  35. 7.  Differences in arithmetic operations:  There is no rerandom.  Quotient
  36. and / are equivalent, and give an integer result if both inputs are
  37. integers.  Additional arithmetic operations are difference (prefix -),
  38. greaterp (prefix >), lessp (prefix <), maximum, minimum, zerop, pow (two
  39. inputs, x to the y power).  LSRHS random is like Apple "random 10"; LSRHS
  40. rnd is like Apple random.
  41.  
  42. 8.  Differences in conditionals and flow of control:  LSRHS Logo has trace
  43. and untrace (no inputs, affect all procedures).  Pausing works somewhat
  44. differently.  Your Unix interrupt character pauses; your quit character
  45. stops all procedures.  The equivalent of ERRACT is the procedure errpause.
  46. See the manual.
  47.  
  48. 9.  Differences in reading and printing:  There is no buttonp or paddle.
  49. In order to use readchar and keyp, you must first use cbreak.  (See the
  50. LSRHS Logo Manual.)  Apple show is called fprint in LSRHS.  There is also
  51. ftype for full type without newline.
  52.  
  53. 10.  Differences in screen commands:  LSRHS Logo has no cleartext (type
  54. control-L instead), cursor, or setcursor.
  55.  
  56. 11.  Workspace management:  There is no concept of a workspace in LSRHS
  57. Logo.  Procedures are saved in individual files, and variables are not
  58. saved at all.  Therefore, none of bury, erall, ern, erns, erps, package,
  59. pkgall, poall, pons, pops, or unbury exist.  The Apple Logo po is called
  60. show (note that Apple Logo uses show with a different meaning), but po
  61. is accepted as an abbreviation.  Erase exists, and pots exists with no input.
  62.  
  63. 12.  Differences in files:  None of catalog, disk, erasefile, load,
  64. save, and setdisk exist in LSRHS Logo.  But there is a facility for
  65. reading and writing arbitrary text files, using the primitives
  66. openread, openwrite, fileread, fileword, fileprint, filefprint, filetype,
  67. fileftype, and close.  See the LSRHS Logo Manual.  Other file directory
  68. manipulation can be done using the unix command:
  69.         unix [ls -la]
  70.  
  71. 13.  Error handling:  The primitives catch, throw, and error do not
  72. exist in LSRHS Logo.  The special name erract is not used.
  73. There is a command toplevel which is equivalent to throw "toplevel.
  74.  
  75. 14.  Procedure redefinition:  None of copydef, define, definedp,
  76. primitivep, or text exist.  The special name redefp is not used.
  77.  
  78. 15.  Miscellany:  There are no label, nodes, recycle, reparse, .bpt,
  79. .contents, .deposit, .examine, or .printer primitives.  The go primitive
  80. takes a numeric input; a procedure line can start with a number which is
  81. ignored except to serve as a label for go.  The LSRHS time primitive
  82. outputs the current date and time.  The command goodbye is used to exit
  83. from Logo.  The command help prints a help message, and describe with
  84. one input, the name of a primitive, prints a description of that
  85. primitive.
  86.  
  87. 16.  Floor turtles:  LSRHS has the primitives turtle, hitoot, lotoot,
  88. lampon, lampoff, ftouch, btouch, ltouch, and rtouch applicable to
  89. floor turtles.
  90.