home *** CD-ROM | disk | FTP | other *** search
/ BMUG PD-ROM A / PD-ROM A.iso / Programming / Programming Languages / ABC Language / MacABC.help < prev   
Encoding:
Text File  |  1990-01-09  |  12.7 KB  |  328 lines  |  [TEXT/MACA]

  1. Helpfile for MacABC.
  2.  
  3. To adapt: everything between lines with just =i= and === is printed
  4. by the i-th item in the Help menu.
  5.  
  6. =1=
  7. --------------------------------------------------------------------
  8. Open from Finder:
  9.  
  10. MacABC             to start in workspace group in folder "abc" on this disk
  11.  
  12. wsgroup.abc        to start in workspace group in this folder
  13.  
  14. perm.abc           to start in this workspace
  15. sugg.abc            idem
  16. position.abc        idem
  17. types.abc           idem
  18. *.cts               idem
  19.  
  20. xxx.cmd            to execute command defined by this how-to
  21.                     (provided it has no parameters)
  22. --------------------------------------------------------------------
  23. ===
  24. =2=
  25. --------------------------------------------------------------------
  26. TEXT file to table:
  27.         Fill an ABC table with text lines from any Macintosh TEXT file
  28. table to TEXT file:
  29.         Write text lines from an ABC table to a MacWrite TEXT file
  30. how-to's to TEXT file:
  31.         List the how-to's in workspace on a MacWrite TEXT file
  32. Page Setup:
  33.         As in any Mac application ...
  34. Print location:
  35. Print how-to:
  36. Print workspace how-to's:
  37.         Printing ...
  38. Recover current workspace:
  39.         Recover the current workspace when its index is lost
  40. Recover workspace-group index:
  41.         Recover the index of a group of workspaces
  42. Quit:
  43.         You can also type "QUIT" to finish an ABC session
  44. --------------------------------------------------------------------
  45. ===
  46. =3=
  47. --------------------------------------------------------------------
  48. Key bindings not shown in menus:
  49.  
  50. Undo          [Backspace]
  51. Clear         [Clear]
  52. Accept        [Tab]
  53. Newline       [Return]
  54. Exit          [Enter]
  55.  
  56. Up      \
  57. Down     \    Arrow keys
  58. Left     /
  59. Right   /
  60.  
  61. Cut and Clear are actually ABC's Delete; bound to [Cmd-X] and [Clear].
  62. Copy and Paste are ABC's Copy; bound to [Cmd-C] and [Cmd-V]. 
  63. These Command-key equivalents also work for disabled menu items. 
  64.  
  65. ABC's copybuffer is not passed on to the Mac Clipboard.
  66. --------------------------------------------------------------------
  67. ===
  68. =4=
  69. --------------------------------------------------------------------
  70. :name   visit a how-to
  71. :       visit last how-to
  72. ::      list how-to's
  73.  
  74. =name   visit a permanent location
  75. =       visit last permanent location
  76. ==      list permanent locations
  77.  
  78. Use "Exit" from the Special menu (or [Enter] key) to end visit.
  79.  
  80. >name   visit a workspace
  81. >       visit last workspace
  82. >>      list workspaces
  83. --------------------------------------------------------------------
  84. ===
  85. =5=
  86. --------------------------------------------------------------------
  87. NAME      DEFAULT KEYS*    SHORT DESCRIPTION
  88.  
  89. Undo      [Cmd-Z],         Undo effect of last key pressed (may be repeated)
  90.            [Backspace]
  91. Redo      [Cmd-U]          Redo last UNDOne key (may be repeated)
  92.  
  93. Copy+     [Cmd-C], [Cmd-V] Copy buffer to hole, or focus to buffer
  94. Delete+   [Cmd-X], [Clear] Delete contents of focus (to buffer if empty)
  95.  
  96. + Cut and Clear are mapped to ABC's Delete.
  97.   Copy and Paste are mapped to ABC's Copy.
  98.   ABC's copybuffer is not (yet) transferred to the Mac's Clipboard.
  99.   The keyboard equivalents for Copy and Delete always work
  100.   (regardless of disabled menu items).
  101.   
  102. * [Cmd-X] means: hold the [Command] key (with the Clover-leaf symbol
  103.   or an Apple) down while pressing x.
  104. --------------------------------------------------------------------
  105. ===
  106. =6=
  107. --------------------------------------------------------------------
  108. NAME      DEFAULT KEYS     SHORT DESCRIPTION
  109.  
  110. Widen     [Cmd-W]          Widen focus
  111. Extend    [Cmd-E]          Extend focus (usually to the right)
  112. First     [Cmd-F]          Move focus to first contained item
  113. Last      [Cmd-L]          Move focus to last contained item
  114. Previous  [Cmd-P]          Move focus to previous item
  115. Next      [Cmd-N]          Move focus to next item
  116. Upline    [Cmd-U]          Move focus to whole line above
  117. Downline  [Cmd-D]          Move focus to whole line below
  118.  
  119. Up        <UpArrow>        Make new hole, move up
  120. Down      <DownArrow>      Make new hole, move down
  121. Left      <LeftArrow>      Make new hole, move left
  122. Right     <RightArrow>     Make new hole, move right
  123.  
  124. Goto      <mouseclick>     New focus at cursor position
  125. --------------------------------------------------------------------
  126. ===
  127. =7=
  128. --------------------------------------------------------------------
  129. NAME      DEFAULT KEYS     SHORT DESCRIPTION
  130.  
  131. Accept    [Tab]            Accept suggestion, focus to hole or end of line
  132. Return    [Return]         Add line or decrease indentation
  133.  
  134. Record    [Cmd-R]          Start/stop recording keystrokes
  135. Play      [Cmd-T]          Play back recorded keystrokes
  136.  
  137. Exit      [Enter]          Finish changes or execute command
  138.  
  139.  
  140. Select Pause menu title to temporarily halt interpreter output.
  141.  
  142. Interrupt [Cmd-.]          Interrupt command execution
  143. --------------------------------------------------------------------
  144. ===
  145. =9=
  146. --------------------------------------------------------------------
  147. WRITE expr                      Write to screen;
  148.                                  / before or after expr gives new line
  149. READ address EG expr            Read expression from terminal to address;
  150.                                  expr is example
  151. READ address RAW                Read line of text
  152. PUT expr IN address             Put value of expr in address
  153. SET RANDOM expr                 Start random sequence for random and choice
  154. REMOVE expr FROM list           Remove one element from list
  155. INSERT expr IN list             Insert in right place
  156. DELETE address                  Delete permanent location or table entry
  157. PASS                            Do nothing
  158. KEYWORD expr KEYWORD ...        Execute user-defined command
  159. KEYWORD                         Execute refined command
  160.  
  161. CHECK test                      Check test and stop if it fails
  162. IF test:                        If test succeeds, execute commands;
  163.    commands                         no ELSE allowed
  164. SELECT:                         Select one alternative:
  165.     test: commands                   try each test in order
  166.     ...                              (one must succeed;
  167.     test: commands                   the last test may be ELSE)
  168. WHILE test:                     As long as test succeeds
  169.    commands                         execute commands
  170. FOR name,... IN train:          Take each element of train in turn
  171.    commands
  172. --------------------------------------------------------------------
  173. ===
  174. =10=
  175. --------------------------------------------------------------------
  176. HOW TO KEYWORD ...:             Define new command KEYWORD ...
  177.    commands
  178. HOW TO RETURN f:                Define new function f with no arguments
  179.    commands                        (returns a value)
  180. HOW TO RETURN f x:              Define new function f with one argument
  181.    commands
  182. HOW TO RETURN x f y:            Define new function f with two arguments
  183.    commands
  184. HOW TO REPORT pr:               Define new predicate pr with no arguments
  185.    commands                        (succeeds/fails)
  186. HOW TO REPORT pr x:             Define new predicate pr with one argument
  187.    commands
  188. HOW TO REPORT x pr y:           Define new predicate pr with two arguments
  189.    commands
  190.  
  191. SHARE name,...                  Share permanent locations
  192.   (before commands of how-to)
  193.  
  194. Refinements (after the commands of a how-to)
  195.  
  196. KEYWORD: commands               Define command refinement
  197. name: commands                  Define expression- or test-refinement
  198.  
  199. Terminating commands
  200.  
  201. QUIT                            Leave command how-to or command refinement,
  202.                                  or leave ABC
  203. RETURN expr                     Leave function how-to or expression
  204.                                  refinement, return value of expr
  205. REPORT test                     Leave predicate how-to or test-refinement,
  206.                                  report outcome of test
  207. SUCCEED                         The same, report success
  208. FAIL                            The same, report failure
  209. --------------------------------------------------------------------
  210. ===
  211. =11=
  212. --------------------------------------------------------------------
  213. 666, 3.14, 3.14e-9              Exact constants
  214.  
  215. expr,expr,...                   Compound
  216. name,name,...                   Naming (may also be used as address)
  217. text@p                          "ABCD"@2 = "BCD" (also address)
  218. text|q                          "ABCD"|3 = "ABC" (also address)
  219. text@p|q                        "ABCD"@2|1 = "BCD"|1 = "B"
  220.  
  221. table[expr]                     Table selection (also address)
  222.  
  223. "Jan", 'Feb', 'Won''t!'         Textual displays (empty: "" or '')
  224. "value = `expr`;"               Conversion of expr to text
  225.  
  226. {1; 2; 2; ...}                  List display (empty: {})
  227. {1..9; ...}, {"a".."z"; ...}    List of consecutive values
  228.  
  229. {["Jan"]: 1; ["Feb"]: 2; ...}   Table display (empty: {})
  230.  
  231. f, f x, x f y                   Result of function f (no permanent effects)
  232. name                            Result of refinement (no permanent effects)
  233. --------------------------------------------------------------------
  234. ===
  235. =12=
  236. --------------------------------------------------------------------
  237. TESTS
  238.  
  239. x < y, x <= y, x >= y, x > y    Order tests
  240. x = y, x <> y                        (<> means `not equals')
  241. 0 <= d < 10
  242.  
  243. pr, pr x, x pr y                Outcome of predicate pr (no permanent
  244.   effects)
  245. name                            Outcome of refinement (no permanent effects)
  246.  
  247. test AND test AND ...           Fails as soon as one of the tests fails
  248. test OR test OR ...             Succeeds as soon as one of the tests succeeds
  249. NOT test
  250.  
  251. SOME name,... IN train HAS test Sets name, ... on success
  252. EACH name,... IN train HAS test Sets name, ... on failure
  253. NO   name,... IN train HAS test Sets name, ... on failure
  254. --------------------------------------------------------------------
  255. ===
  256. =13=
  257. --------------------------------------------------------------------
  258. Functions and predicates on numbers
  259.  
  260. ~x                              Approximate value of x
  261. exactly x                       Exact value of x
  262. exact x                         Test if x is exact
  263. +x, x+y, x-y, -x, x*y, x/y      Plain arithmetic
  264. x**y                            x raised to the power y
  265. root x, n root x                Square root, n-th root
  266. abs x, sign x                   Absolute value, sign (= -1, 0, or +1)
  267. round x, floor x, ceiling x     Rounded to whole number
  268. n round x                       x rounded to n digits after decimal point
  269. a mod n                         Remainder of a on division by n
  270. */x                             Numerator of exact number x
  271. /*x                             Denominator
  272. random                          Random approximate number r, 0 <= r < 1
  273. e, exp x                        Base of natural logarithm, exponential function
  274. log x, b log x                  Natural logarithm, logarithm to the base b
  275. pi, sin x, cos x, tan x, arctan x Trigonometric functions, with x in radians
  276. angle (x, y), radius (x, y)     Angle of and radius to point (x, y)
  277. c sin x, c cos x, c tan x       Similar, with the circle divided into c parts
  278. c arctan x, c angle (x, y)          (e.g. 360 for degrees)
  279. now                             e.g. (1999, 12, 31, 23, 59, 59.999)
  280. --------------------------------------------------------------------
  281. ===
  282. =14=
  283. --------------------------------------------------------------------
  284. Functions on texts
  285.  
  286. t^u                             t and u joined into one text
  287. t^^n                            t repeated n times
  288. lower t                         lower "aBc" = "abc"
  289. upper t                         upper "aBc" = "ABC"
  290. stripped t                      Strip leading and trailing spaces from t
  291. split t                         Split text t into words
  292.  
  293. Function on tables
  294.  
  295. keys table                      List of all keys in table
  296.  
  297. Functions and predicates on trains
  298.  
  299. #train                          Number of elements in train
  300. e#train                         Number of elements equal to e
  301. e in train, e not.in train      Test for presence or absence
  302. min train                       Smallest element of train
  303. e min train                     Smallest element larger than e
  304. max train, e max train          Largest element
  305. train item n                    n-th element
  306. choice train                    Random element
  307. --------------------------------------------------------------------
  308. ===
  309. =15=
  310. --------------------------------------------------------------------
  311. Functions on all types
  312.  
  313. x<<n                            x converted to text, aligned left in width n
  314. x><n                            The same, centred
  315. x>>n                            The same, aligned right
  316.  
  317. THE CHARACTERS
  318.  
  319.  !"#$%&'()*+,-./                This is the order of all characters
  320. 0123456789:;<=>?                that may occur in a text.
  321. @ABCDEFGHIJKLMNO                (The first is a space.)
  322. PQRSTUVWXYZ[\]^_
  323. `abcdefghijklmno
  324. pqrstuvwxyz{|}~
  325. --------------------------------------------------------------------
  326. ===
  327.  
  328.