home *** CD-ROM | disk | FTP | other *** search
/ GEMini Atari / GEMini_Atari_CD-ROM_Walnut_Creek_December_1993.iso / files / language / abcst / abc.hlp next >
Encoding:
Text File  |  1990-01-05  |  20.5 KB  |  465 lines

  1. SUMMARY OF SPECIAL ACTIONS
  2.  
  3.   :name   Visit how-to called 'name'
  4.   :       Visit last how-to refered to
  5.   ::      Display headings of how-to's in this workspace
  6.  
  7.   =name   Visit contents of location
  8.   =       Visit last location visited
  9.   ==      Display names of permament locations in this workspace
  10.  
  11.   >name   Visit workspace 'name'
  12.   >       Visit last workspace visited
  13.   >>      Display list of workspace names
  14.  
  15.   QUIT    Leave ABC
  16.  
  17. SUMMARY OF EDITING OPERATIONS
  18.  
  19.   Name      Default Keys*    Short description
  20.  
  21.   Accept    [TAB]            Accept suggestion, focus to hole or end of line
  22.   Return    [RETURN]         Add line or decrease indentation
  23.  
  24.   Widen     f1, [ESC] w      Widen focus
  25.   Extend    f2, [ESC] e      Extend focus (usually to the right)
  26.   First     f3, [ESC] f      Move focus to first contained item
  27.   Last      f4, [ESC] l      Move focus to last contained item
  28.  
  29.   Previous  f5, [ESC] p      Move focus to previous item
  30.   Next      f6, [ESC] n      Move focus to next item
  31.   Upline    f7, [ESC] u      Move focus to whole line above
  32.   Downline  f8, [ESC] d      Move focus to whole line below
  33.  
  34.   Up        ^, [ESC] U       Make new hole, move up
  35.   Down      v, [ESC] D       Make new hole, move down
  36.   Left      <-, [ESC] ,      Make new hole, move left
  37.   Right     ->, [ESC] .      Make new hole, move right
  38.  
  39.   Goto      [ctrl-G], mouseclick  New focus at cursor position
  40.  
  41.   Undo      [BACKSPACE]      Undo effect of last key pressed (may be repeated)
  42.   Redo      [ctrl-U]         Redo last UNDOne key (may be repeated)
  43.  
  44.   Copy      f9, [ctrl-C], [ESC]c  Copy buffer to hole, or focus to buffer
  45.   Delete    [ctrl-D]         Delete contents of focus (to buffer if empty)
  46.  
  47.   Record    [ctrl-R]         Start/stop recording keystrokes
  48.   Play      [ctrl-P]         Play back recorded keystrokes
  49.  
  50.   Look      [ctrl-L]         Redisplay screen
  51.   Help      f10, [ESC]?      Print summary of editing operations
  52.  
  53.   Exit      [ctrl-X]         Finish changes or execute command
  54.   Interrupt (as set by 'stty')Interrupt command execution
  55.   Suspend (as set by 'stty') Suspend ABC (only for shell with job control)
  56.  
  57.   * Notes:
  58.  
  59.   [Ctrl-D] means: hold the [CTRL] (or [CONTROL]) key down while pressing d.
  60.  
  61.   [ESC] w means: press the [ESC] key first, then w.
  62.  
  63. ABC QUICK REFERENCE
  64.  
  65.   COMMANDS
  66.  
  67.   WRITE expr                    Write to screen;
  68.                                 / before or after expr gives new line
  69.   READ address EG expr          Read expression from terminal to address;
  70.                                 expr is example
  71.   READ address RAW              Read line of text
  72.   PUT expr IN address           Put value of expr in address
  73.   SET RANDOM expr               Start random sequence for random and choice
  74.   REMOVE expr FROM list         Remove one element from list
  75.   INSERT expr IN list           Insert in right place
  76.   DELETE address                Delete permanent location or table entry
  77.   PASS                          Do nothing
  78.   KEYWORD expr KEYWORD ...      Execute user-defined command
  79.   KEYWORD                       Execute refined command
  80.  
  81.   CHECK test                    Check test and stop if it fails
  82.   IF test:                      If test succeeds, execute commands;
  83.      commands                       no ELSE allowed
  84.   SELECT:                       Select one alternative:
  85.       test: commands                 try each test in order
  86.       ...                            (one must succeed;
  87.       test: commands                 the last test may be ELSE)
  88.   WHILE test:                   As long as test succeeds
  89.      commands                       execute commands
  90.   FOR name,... IN train:        Take each element of train in turn
  91.      commands
  92.  
  93.   HOW-TO's
  94.  
  95.   HOW TO KEYWORD ...:           Define new command KEYWORD ...
  96.      commands
  97.   HOW TO RETURN f:              Define new function f with no arguments
  98.      commands                      (returns a value)
  99.   HOW TO RETURN f x:            Define new function f with one argument
  100.      commands
  101.   HOW TO RETURN x f y:          Define new function f with two arguments
  102.      commands
  103.   HOW TO REPORT pr:             Define new predicate pr with no arguments
  104.      commands                      (succeeds/fails)
  105.   HOW TO REPORT pr x:           Define new predicate pr with one argument
  106.      commands
  107.   HOW TO REPORT x pr y:         Define new predicate pr with two arguments
  108.      commands
  109.  
  110.   SHARE name,...                Share permanent locations
  111.                                 (before commands of how-to)
  112.  
  113.   Refinements (after the commands of a how-to)
  114.  
  115.   KEYWORD : commands            Define command refinement
  116.   name: commands                Define expression- or test-refinement
  117.  
  118.   Terminating commands
  119.  
  120.   QUIT                          Leave command how-to or command refinement,
  121.                                 or leave ABC
  122.   RETURN expr                   Leave function how-to or expression refinement,
  123.                                 return value of expr
  124.   REPORT test                   Leave predicate how-to or test-refinement,
  125.                                 report outcome of test
  126.   SUCCEED                       The same, report success
  127.   FAIL                          The same, report failure
  128.  
  129.   EXPRESSIONS AND ADDRESSES
  130.  
  131.   666, 3.14, 3.14e-9            Exact constants
  132.  
  133.   expr,expr,...                 Compound
  134.   name,name,...                 Naming (may also be used as address)
  135.  
  136.   text@p                        "ABCD"@2 = "BCD" (also address)
  137.   text|q                        "ABCD"|3 = "ABC" (also address)
  138.   text@p|q                      "ABCD"@2|1 = "BCD"|1 = "B"
  139.  
  140.   table[expr]                   Table selection (also address)
  141.  
  142.   "Jan", 'Feb', 'Won''t!'       Textual displays (empty: "" or '')
  143.   "value = `expr`;"             Conversion of expr to text
  144.  
  145.   {1; 2; 2; ...}                List display (empty: {})
  146.   {1..9; ...}, {"a".."z"; ...}  List of consecutive values
  147.  
  148.   {["Jan"]: 1; ["Feb"]: 2; ...} Table display (empty: {})
  149.  
  150.   f, f x, x f y                 Result of function f (no permanent effects)
  151.   name                          Result of refinement (no permanent effects)
  152.  
  153.   TESTS
  154.  
  155.   x < y, x <= y, x >= y, x > y  Order tests
  156.   x = y, x <> y                      (<> means 'not equals')
  157.   0 <= d < 10
  158.  
  159.   pr, pr x, x pr y              Outcome of predicate pr (no permanent effects)
  160.   name                          Outcome of refinement (no permanent effects)
  161.  
  162.   test AND test AND ...         Fails as soon as one of the tests fails
  163.   test OR test OR ...           Succeeds as soon as one of the tests succeeds
  164.   NOT test
  165.  
  166.   SOME name,... IN train HAS test
  167.                                 Sets name, ... on success
  168.   EACH name,... IN train HAS test
  169.                                 Sets name, ... on failure
  170.   NO   name,... IN train HAS test
  171.                                 Sets name, ... on failure
  172.  
  173.   PREDEFINED FUNCTIONS AND PREDICATES
  174.  
  175.   Functions and predicates on numbers
  176.  
  177.   ~x                            Approximate value of x
  178.   exactly x                     Exact value of x
  179.   exact x                       Test if x is exact
  180.   +x, x+y, x-y, -x, x*y, x/y    Plain arithmetic
  181.   x**y                          x raised to the power y
  182.   root x, n root x              Square root, n-th root
  183.   abs x, sign x                 Absolute value, sign (= -1, 0, or +1)
  184.   round x, floor x, ceiling x   Rounded to whole number
  185.   n round x                     x rounded to n digits after decimal point
  186.   a mod n                       Remainder of a on division by n
  187.   */x                           Numerator of exact number x
  188.   /*x                           Denominator
  189.   random                        Random approximate number r, 0 <= r < 1
  190.   e, exp x                      Base of natural logarithm, exponential function
  191.   log x, b log x                Natural logarithm, logarithm to the base b
  192.   pi, sin x, cos x, tan x, arctan x
  193.                                 Trigonometric functions, with x in radians
  194.   angle (x, y), radius (x, y)   Angle of and radius to point (x, y)
  195.   c sin x, c cos x, c tan x     Similar, with the circle divided into c parts
  196.   c arctan x, c angle (x, y)        (e.g. 360 for degrees)
  197.   now                           e.g. (1999, 12, 31, 23, 59, 59.999)
  198.  
  199.   Functions on texts
  200.  
  201.   t^u                           t and u joined into one text
  202.   t^^n                          t repeated n times
  203.   lower t                       lower "aBc" = "abc"
  204.   upper t                       upper "aBc" = "ABC"
  205.   stripped t                    Strip leading and trailing spaces from t
  206.   split t                       Split text t into words
  207.  
  208.   Function on tables
  209.  
  210.   keys table                    List of all keys in table
  211.  
  212.   Functions and predicates on trains
  213.  
  214.   #train                        Number of elements in train
  215.   e#train                       Number of elements equal to e
  216.   e in train, e not.in train    Test for presence or absence
  217.   min train                     Smallest element of train
  218.   e min train                   Smallest element larger than e
  219.   max train, e max train        Largest element
  220.   train item n                  n-th element
  221.   choice train                  Random element
  222.  
  223.   Functions on all types
  224.  
  225.   x<<n                          x converted to text, aligned left in width n
  226.   x><n                          The same, centred
  227.   x>>n                          The same, aligned right
  228.  
  229.   THE CHARACTERS
  230.  
  231.    !"#$%&'()*+,-./              This is the order of all characters
  232.   0123456789:;<=>?              that may occur in a text.
  233.   @ABCDEFGHIJKLMNO              (The first is a space.)
  234.   PQRSTUVWXYZ[\]^_
  235.   `abcdefghijklmno
  236.   pqrstuvwxyz{|}~
  237.  
  238. ABC MANUAL
  239.  
  240. NAME
  241.   abc - ABC interpreter & environment
  242.   abckeys - change key bindings for 'abc'
  243.  
  244. SYNOPSIS
  245.   abc    [workspace and editor options]  [file ...]
  246.   abc    [workspace and task options]
  247.   abckeys
  248.  
  249. DESCRIPTION
  250.   Without options or files, the ABC interpreter is started, using the ABC
  251.   editor, in the last workspace used or in workspace 'first' if this is
  252.   your first abc session.  A workspace is kept as a group of files in a
  253.   directory, with separate files for each how-to and location.  The
  254.   workspace directories themselves are kept by default in the directory
  255.   $HOME/abc.  On non-Unix machines, $HOME is the disk you are working on.
  256.  
  257.   Workspace Options:
  258.  
  259.   -W dir        use group of workspaces in 'dir' instead of $HOME/abc.
  260.  
  261.   -w name       start in workspace 'name' instead of last workspace used.
  262.  
  263.   -w path       use 'path' as workspace (no -W option allowed).
  264.  
  265.   Editor option:
  266.  
  267.   -e            Use $EDITOR as editor to edit definitions, instead of ABC
  268.                 editor (Unix only).
  269.  
  270.   file ...      Read commands from file(s) instead of from standard input;
  271.                 input for READ commands is taken from standard input.  If a
  272.                 file is called '-' and standard input is the keyboard, the
  273.                 ABC system is started up interactively for that entry.
  274.  
  275.   Special tasks:
  276.  
  277.   -i tab        Fill table 'tab' with text lines from standard input
  278.  
  279.   -o tab        Write text lines from table 'tab' to standard output
  280.  
  281.   -l            List the how-to's in workspace on standard output
  282.  
  283.   -r            Recover a workspace when its index is lost: useful after a
  284.                 machine crash if the ABC internal administration files
  285.                 didn't get written out.
  286.  
  287.   -R            Recover the index of a group of workspaces
  288.  
  289. USAGE
  290.   (This is necessarily a very brief description; see 'The ABC Programmer's
  291.   Handbook' for full details.)
  292.  
  293.   Use 'QUIT' to finish an ABC session.
  294.  
  295.   When ABC starts up interactively, it displays a prompt and awaits input.
  296.  
  297.   TYPING AND SUGGESTIONS: as you type, the system tries to suggest a
  298.   possible continuation for what you have typed; to accept the suggestion,
  299.   press [accept] (by default this is bound to the [TAB] key; type '?' to
  300.   find out the bindings for the keyboard you are using).  If you don't want
  301.   to accept the suggestion, just carry on typing (you can always type
  302.   character for character, ignoring the suggestions).  Usually the system
  303.   knows where a letter must be capital and where not, and you usually don't
  304.   have to use the shift key; however, in the few places where both a
  305.   lower-case and an upper-case letter would be legal (for instance for
  306.   AND), you have to type the letter upper-case.
  307.  
  308.   When you type a control command, like WHILE, the system provides
  309.   indentation automatically for the body of the command; to reduce the
  310.   indentation one level, type [return].
  311.  
  312.   CORRECTING AND EDITING: the [undo] key (by default bound to backspace)
  313.   undoes the last key you typed.  Repeatedly typing it undoes more and
  314.   more, up to a certain maximum number of keypresses.
  315.  
  316.   To correct other parts, you must put the 'focus' onto the part you want
  317.   to change.  The focus is displayed by underlining or reverse video.
  318.   [Widen] and [extend] make the focus larger, [first] and [last] make it
  319.   smaller.
  320.  
  321.   [Delete] deletes the contents of the focus.
  322.  
  323.   [Copy] copies the contents of the focus to a buffer, or if the focus is
  324.   not focussed on anything, copies the contents of the buffer back to where
  325.   you are positioned.
  326.  
  327.   MOVING THE FOCUS: [Upline] and [downline] focus on one line above or
  328.   below.  [Previous] and [next] move the focus left and right.  [Up],
  329.   [down], [left], and [right] move an empty focus around.  [Goto] widens
  330.   the focus to the largest thing at the current position.
  331.  
  332.   OTHER OPERATIONS: [Look] redraws the screen; [record] records all
  333.   keystrokes until the next time you press [record] - [play] replays them.
  334.   [Redo] redoes the last key(s) undone; [interrupt] interrupts a running
  335.   command.
  336.  
  337.   WORKSPACES: To create a new workspace, or go to an existing workspace,
  338.   type '>name'.  To go to the last workspace you were in, type a single
  339.   '>'.  To get a list of workspace names, type '>>'.
  340.  
  341.   HOW-TO's: To create a new how-to, just type the first line of the how-to.
  342.   This creates the new how-to, and allows you to type the body.  Use [exit]
  343.   to finish it (by default [ESC][ESC]).
  344.  
  345.   To visit a how-to, type a colon, followed by the name of the how-to.
  346.   Again, use [exit] to exit.  To visit the last how-to again, or the last
  347.   how-to you got an error message for, type a single ':'.  To get a list of
  348.   the how-to's in this workspace, type '::'.
  349.  
  350.   To edit a location, type a '=' followed by the name of the location.  To
  351.   re-edit it, type a single '='.  To get a list of the locations in the
  352.   workspace, type '=='.
  353.  
  354. KEY BINDINGS
  355.   The binding of editing operations like [accept] to keys may be different
  356.   for your keyboard; type a '?' at the prompt to find out what the bindings
  357.   are for your keyboard.
  358.   To redefine the keys used for editor operations, run 'abckeys'.  This
  359.   produces a private key definitions file.  You will be given instructions
  360.   on how to use it.
  361.   Keys labeled f1...f8 are function keys. On Unix, the way to type these is
  362.   terminal-dependent.  The codes they send must be defined by the termcap
  363.   entry for your terminal.
  364.   If a terminal has arrow keys which transmit codes to the computer, these
  365.   should be used for Up, Down, Left and Right.  Again, the termcap entry
  366.   must define the codes.
  367.   The Goto operation is of most use if the cursor can be moved locally at
  368.   the terminal, or if the terminal has a mouse; the Goto operation will
  369.   sense the terminal for the cursor or mouse position.  On Unix, we use two
  370.   extra non-standard termcap capabilities for this: 'sp' which gives the
  371.   string that must be sent to the terminal to sense the cursor position,
  372.   and 'cp' which defines the format of the reply (in the same format as
  373.   other cursor-addressing strings in termcap).  If your terminal's mouse-
  374.   click sends the position of the click automatically, just set 'sp' to the
  375.   empty string.  See termcap(5) for more details.
  376.  
  377. FILES
  378.   $HOME/copybuf.abc        copy buffer between sessions
  379.   $HOME/abc/wsgroup.abc    table mapping workspace names to directory names
  380.   $HOME/abc/abckeys_$TERM  private key definitions file (Unix only)
  381.   $HOME/abc/abc.key        private key definitions file (non-Unix)
  382.   position.abc             focus position of edited how-to's in workspace
  383.   perm.abc                 table mapping object names to file names
  384.   suggest.abc              suggestion list for user-defined commands
  385.   types.abc                table with codes for typechecking between how-to's
  386.   *.cmd                    command how-to's in this workspace
  387.   *.zfd, *.mfd, *.dfd      function how-to's in this workspace
  388.   *.zpd, *.mpd, *.dpd      predicate how-to's in this workspace
  389.   *.cts                    permanent locations in this workspace
  390.   abc.msg                  messages file, used for errors (not on Macintosh)
  391.   abc.hlp                  helpfile with this text (MacABC.help on Macintosh)
  392.  
  393.   The latter two are searched for first in your startup directory, then in
  394.   $HOME/abc, and finally, on Unix, in a directory determined by the
  395.   installer of ABC.  On the IBM PC and Atari ST the directories in your
  396.   $PATH are used in the last stage (if you have a hard disk place these
  397.   files in the workspaces directory abc).
  398.  
  399. ATARI ST IMPLEMENTATION
  400.   There are four files supplied: the program abc.tos itself, abckeys.tos
  401.   for changing your key bindings, the help file abc.hlp, and the error
  402.   messages file abc.msg.  (See FILES above.)
  403.   If you start ABC up from the desktop, and you want to use the options
  404.   given above, like -w, you should rename abc.tos to abc.ttp.  There is an
  405.   additional facility for redirecting input and output: the parameter
  406.   >outfile redirects all output from ABC to the file called outfile, and
  407.   similarly <infile takes its input from the file called infile.
  408.  
  409. IBM PC IMPLEMENTATION
  410.   There are four files for running ABC, the program abc.exe itself,
  411.   abckeys.exe for changing your key bindings, the help file abc.hlp, and
  412.   the error messages file abc.msg.  (See FILES above.)
  413.   If your screen size is non-standard, or your machine is not 100% BIOS
  414.   compatible (which is unusal these days), you can specify the screen-size,
  415.   and whether to use the BIOS or ANSI.SYS for output, by typing after the
  416.   A> prompt, before you start ABC up, one of the following:
  417.        SET SCREEN=ANSI lines cols
  418.        SET SCREEN=BIOS lines cols
  419.   If you are going to use ANSI.SYS, be sure you have the line
  420.        DEVICE=ANSI.SYS
  421.   in your CONFIG.SYS file.  Consult the DOS manual for further details.
  422.  
  423. APPLE MACINTOSH IMPLEMENTATION
  424.   There are three files supplied: MacABC, the application itself,
  425.   MacABC.help, the help file, and MacABC.doc, a MacWrite document
  426.   containing a variant of this text.  The help file should be in the same
  427.   folder as MacABC, or in your System Folder.
  428.   MacABC runs in a single window.  You'll notice that most operations are
  429.   menu entries, as well as being possible from the keyboard.  You can start
  430.   ABC up by double-clicking the MacABC icon in which case you start up in
  431.   the last workspace used, or by double-clicking on any icon in a
  432.   workspace, in which case you start in that workspace.  In this latter
  433.   case, if the filename of the icon you clicked on ends in .cmd, that how-
  434.   to is executed, but the how-to may not have any parameters.
  435.   Instead of the special option flags mentioned above, most of the tasks,
  436.   like recovering a workspace, can be done from the File menu.
  437.   * Notes for Macintosh guru's:
  438.   The messages are STR# resources in MacABC; you must use a resource editor
  439.   to change them.
  440.   MacABC uses Monaco 9 for the screen, and Courier 10 for printing.  You
  441.   can change them with ResEdit, by editing the resource with type Conf and
  442.   ID 0.  The horizontal and vertical window-size and the window-title can
  443.   also be adapted there.  To facilitate this, first Paste the TMPL resource
  444.   with ID 5189 named Conf from MacABC to (a copy of) ResEdit.  But beware,
  445.   MacABC only works properly with Fixed-width Fonts like Monaco and
  446.   Courier.
  447.  
  448. SEE ALSO
  449.   Leo Geurts, Lambert Meertens and Steven Pemberton, The ABC Programmer's
  450.        Handbook, Prentice-Hall, Englewood Cliffs, New Jersey, 1989,
  451.        ISBN 0-13-000027-2.
  452.   Steven Pemberton, An Alternative Simple Language and Environment for PCs,
  453.        IEEE Software, Vol. 4, No. 1, January 1987, pp. 56-64.
  454.   The ABC Newsletter. Available free from CWI.
  455.  
  456. AUTHORS
  457.   Frank van Dijk, Leo Geurts, Timo Krijnen, Lambert Meertens, Steven
  458.   Pemberton, Guido van Rossum.
  459.  
  460. ADDRESS
  461.   ABC Distribution, CWI/AA, Postbox 4079, 1009 AB Amsterdam, The
  462.   Netherlands.
  463.   E-mail: 'abc@cwi.nl'.
  464.  
  465.