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