home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 9 / 09.iso / l / l044 / 4.ddi / ONLINE.ZIP / TEMC.DOC < prev    next >
Encoding:
Text File  |  1990-10-23  |  32.2 KB  |  942 lines

  1.  
  2.  
  3. ======================================================================
  4.                 Using the Turbo Editor Macro Compiler
  5. ======================================================================
  6.  
  7.  
  8. ----------------------------------------------------------------------
  9.                           Table of Contents
  10. ----------------------------------------------------------------------
  11.  1. Operation
  12.  2. Editor macro language syntax
  13.  3. Example scripts
  14.      MakeFuncText
  15.      MakeStub
  16.  4. Built-in commands
  17.      Functional index
  18.       Block macros
  19.       Deletion/insertion
  20.       Search macros
  21.       Hot key macros
  22.       Screen movement
  23.       System macros
  24.      Alphabetical reference
  25.  5. Error messages
  26.  6. Warning message
  27. ----------------------------------------------------------------------
  28.  
  29.    The Turbo Editor Macro Language (TEML) is a powerful utility that
  30.    you can use to enhance or change the IDE's editor. Using the
  31.    140-odd built-in macros, you can define new ones that perform
  32.    sophisticated editing tasks and that can bind keystrokes to these
  33.    tasks.
  34.  
  35. NOTE: SetReturnCode macros are designated with an asterisk (*).
  36. These special macros terminate the macro and give a return code.
  37. It is an error to specify a command following a SetReturnCode
  38. macro.
  39.  
  40. ==============
  41.  1. Operation
  42. ==============
  43.  
  44.    In order to use TEML, you first write a macro script in a text
  45.    editor. You then compile the script using the Turbo Editor Macro
  46.    Compiler (TEMC). The compiled file is used as a configuration
  47.    file in Turbo Pascal's IDE.
  48.  
  49.    The Turbo Editor Macro Compiler expects as input an ASCII file
  50.    containing definitions and binding conforming to the TEML
  51.    specification. The output is placed in a configuration file
  52.    that can be used by the Integrated Development Environment.
  53.    The changes from TEMC are incremental; this means that if you
  54.    just change the definition of one key, only that key will be
  55.    changed in the configuration file. Everything else will stay
  56.    as it was.
  57.  
  58.    Here is the syntax for the TEMC utility:
  59.  
  60.      TEMC scriptfile outputconfigfile
  61.  
  62.    You can use any text editor (including Turbo Pascal's) to create
  63.    the ASCII scriptfile. You use the outputconfigfile by naming it
  64.    TPCONFIG.TP and placing it in the directory you will be in when
  65.    starting TURBO.EXE.
  66.  
  67.  
  68. =================================
  69.  2. Editor macro language syntax
  70. =================================
  71.  
  72.    TEML has a simple syntax based on Pascal and C. Here are the
  73.    basic syntax rules of the macro language:
  74.  
  75.     o Statements in a script file are separated with a semicolon.
  76.  
  77.     o Reserved words in TEML are:
  78.  
  79.        ALT       BEGIN
  80.        CTRL      END
  81.        MACRO     SCRIPT
  82.        SHIFT
  83.  
  84.     o Comments are designated in the C style between /* and */ marks.
  85.  
  86.     o In strings, the user can place any legal C backslash (\)
  87.       sequence; for example, "\xD".
  88.  
  89.  
  90.    The rest of this section describes how each possible component of
  91.    the syntax fits into the overall scheme. In this list, the symbol
  92.    ::= means that the object on the left side is composed of the
  93.    objects on the right side. If the list of objects on the right
  94.    side of the ::= begins with the | symbol, then the object on the
  95.    left can be composed of nothing or one of the listed items.
  96.  
  97.     Script:         ::=  ScriptName ScriptItems
  98.  
  99.     ScriptName      ::=  |
  100.                          SCRIPTIdentifier ;
  101.  
  102.     ScriptItems     ::=  |
  103.                          ScriptItems ScriptItem
  104.  
  105.     ScriptItem      ::=  KeyAssignment | MacroDefinition
  106.  
  107.     KeyAssignment   ::=  KeySequence : Command ;
  108.  
  109.     KeySequence     ::=  KeySpecifier|KeySequence +
  110.                          KeySpecifier|KeySequence + ^ KeySpecifier
  111.  
  112.     KeySpecifier    ::=  Key | KeyModifier Key
  113.  
  114.     Key             ::=  Number | Identifier | END
  115.  
  116.     KeyModifier     ::=  | CTRL - | ALT - | SHIFT     -
  117.  
  118.     Command         ::=  BEGIN CommandList OptSemicolon END|
  119.                          MacroCommand
  120.  
  121.     CommandList     ::=  Command |
  122.                          CommandList ; Command
  123.  
  124.     MacroCommand    ::=  CommandName |
  125.                          CommandName (ParamList)
  126.  
  127.     CommandName     ::=  Identifier
  128.  
  129.     ParamList       ::=  Param |
  130.                          ParamList , Param
  131.  
  132.     Param           ::=  Number | String
  133.  
  134.     MacroDefinition ::=  MACRO CommandName CommandList
  135.                          OptSemicolon END ;
  136.  
  137.     OptSemicolon    ::=  | ;
  138.  
  139.     Number          ::=  Digit | Number Digit
  140.  
  141.     Digit           ::=  0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9
  142.  
  143.     Identifier      ::=  Letter | Identifier LetterDigit
  144.  
  145.     Letter          ::=  A to Z | a to z | _
  146.  
  147.     LetterDigit     ::=  Letter | Digit
  148.  
  149.     String          ::=  " AnyCharacterNotQuote "
  150.  
  151.  
  152. ====================
  153.  3. Example scripts
  154. ====================
  155.  
  156.    This example sets up a host of WordStar-like keyboard shortcuts.
  157.  
  158.   Script WordStar;
  159.  
  160.  
  161.   Macro NewLine
  162.     RightOfLine;
  163.     InsertText("\xD");
  164.   End;
  165.  
  166.   /* Key Assignments */
  167.   Ctrl-A      : WordLeft;
  168.   Ctrl-C      : PageDown;
  169.   Ctrl-D      : CursorCharRight;
  170.   Ctrl-E      : CursorUp;
  171.   Ctrl-F      : WordRight;
  172.   Ctrl-G      : DeleteChar;
  173.   Ctrl-H      : BackSpaceDelete;
  174.   Ctrl-J      : CursorDown;
  175.   Ctrl-K+^B   : SetBlockBeg;
  176.   Ctrl-K+^C   : CopyBlock;
  177.   Ctrl-K+^H   : ToggleHideBlock;
  178.   Ctrl-K+^K   : SetBlockEnd;
  179.   Ctrl-K+^Q   : Exit;
  180.   Ctrl-K+^R   : ReadBlock;
  181.   Ctrl-K+^V   : MoveBlock;
  182.   Ctrl-K+^W   : WriteBlock;
  183.   Ctrl-K+^Y   : DeleteBlock;
  184.   Ctrl-K+1    : SetMark(1);
  185.   Ctrl-K+2    : SetMark(2);
  186.   Ctrl-K+3    : SetMark(3);
  187.   Ctrl-L      : RepeatSearch;
  188.   Ctrl-N      : BreakLine;
  189.   Ctrl-O      : NewLine;   /* This is not a WordStar keystroke */
  190.   Ctrl-P      : LiteralChar;
  191.   Ctrl-Q+^A   : Replace;
  192.   Ctrl-Q+^B   : MoveToBlockBeg;
  193.   Ctrl-Q+^C   : EndCursor;
  194.   Ctrl-Q+^D   : RightOfLine;
  195.   Ctrl-Q+^E   : TopOfScreen;
  196.   Ctrl-Q+^F   : GetFindString;
  197.   Ctrl-Q+^K   : MoveToBlockEnd;
  198.   Ctrl-Q+^P   : MoveToPrevPos;
  199.   Ctrl-Q+^R   : HomeCursor;
  200.   Ctrl-Q+^S   : LeftOfLine;
  201.   Ctrl-Q+^X   : BottomOfScreen;
  202.   Ctrl-Q+^Y   : DeleteToEol;
  203.   Ctrl-Q+1    : begin
  204.                   MoveToMark(1);
  205.                   CenterFixScreenPos;
  206.                 end;
  207.  
  208.   Ctrl-Q+2    : begin
  209.                   MoveToMark(2);
  210.                   CenterFixScreenPos;
  211.                 end;
  212.   Ctrl-Q+3    : begin
  213.                   MoveToMark(3);
  214.                   CenterFixScreenPos;
  215.                 end;
  216.   Ctrl-R      : PageUp;
  217.   Ctrl-S      : CursorCharLeft;
  218.   Ctrl-T      : DeleteWord;
  219.   Ctrl-V      : ToggleInsert;
  220.   Ctrl-W      : ScrollDown;
  221.   Ctrl-X      : CursorDown;
  222.   Ctrl-Y      : DeleteLine;
  223.   Ctrl-Z      : ScrollUp;
  224.   Home        : LeftOfLine;
  225.   UpAr        : CursorUp;
  226.   PgUp        : PageUp;
  227.   LfAr        : CursorCharLeft;
  228.   RgAr        : CursorCharRight;
  229.   End         : RightOfLine;
  230.   DnAr        : CursorDown;
  231.   PgDn        : PageDown;
  232.   Ins         : ToggleInsert;
  233.   Ctrl-End    : BottomOfScreen;
  234.   Ctrl-PgDn   : EndCursor;
  235.   Ctrl-Home   : TopOfScreen;
  236.   Ctrl-PgUp   : HomeCursor;
  237.  
  238. MakeFuncText
  239. ==============
  240.  
  241.    MakeFuncText creates a commented area for descriptive text
  242.    associated with a function, assumes the cursor is positioned
  243.    immediately after the name, and the name is at the left of the
  244.    screen.
  245.  
  246.    Script util;
  247.  
  248.    macro MakeFuncText
  249.     InsertText("\n\n");               /* add some whitespace */
  250.     CursorUp;
  251.     CursorUp;
  252.     LeftOfLine;                       /* go before beginning of
  253.                                          intended function name */
  254.     SetBlockBeg;                      /* mark function name */
  255.     WordRight;
  256.     SetBlockEnd;
  257.     LeftOfLine;
  258.     CursorDown;
  259.     CopyBlockRaw;                     /* copy for prototyping */
  260.     CursorUp;
  261.     LeftOfLine;
  262.     InsertText("\nFunction "); /* add "Function" to comment |area*/
  263.     RightOfLine;
  264.     InsertText(":");       /* .. and colon at end */
  265.     CursorUp;             /* put in comment lines fore and |aft */
  266.     LeftOfLine;                  /* add comment divider lines */
  267.     InsertText("{*********");
  268.     InsertText("*********");
  269.     CursorDown;
  270.     RightOfLine;
  271.     InsertText("\n");
  272.     InsertText("\tDescription:\n");
  273.     InsertText("**********");
  274.     InsertText("*********}\n");
  275.     CursorDown;                  /* go back to end of name */
  276.     RightOfLine;
  277.    end;                         /* MakeFuncText */
  278.  
  279.    Alt-T        : MakeFuncText;
  280.  
  281.  
  282. ======================
  283.  3. Built-in commands
  284. ======================
  285.  
  286.    The names of the built-in commands describe their actions.
  287.    Commands with the word screen in them generally only affect the
  288.    screen.
  289.  
  290.    Commands that have the word raw in them perform fewer housekeeping
  291.    tasks than their "raw-less" counterparts. For example, in a long
  292.    macro, using raw commands saves time in that they don't constantly
  293.    update the screen display to reflect each change in cursor
  294.    position. However, you would only use the raw macros as
  295.    intermediate steps in combination with other macros.
  296.  
  297.    Macro names are not case-sensitive. A few macros require
  298.    parameters in parentheses, as discussed in the descriptions.
  299.  
  300.    Remember, you can use these primitive macros to build more
  301.    complicated ones.
  302.  
  303.  Functional index
  304. ==================
  305.  
  306.    This section lists the built-in macros by function. The following
  307.    section is a straight alphabetical list.
  308.  
  309.  
  310.  Block macros
  311. --------------
  312.  
  313.    These macros affect blocks of text.
  314.  
  315.    You should use SetPrevPos or FixScreenPos, or both, at the end of
  316.    the raw macros for housekeeping purposes.
  317.  
  318.      CopyBlock           MoveToBlockEnd
  319.      DeleteBlock         MoveToBlockEndRaw
  320.      DeleteBlockRaw      *ReadBlock
  321.      HighlightBlock      SetBlockBeg
  322.      MoveBlock           SetBlockEnd
  323.      MoveToBlockBeg      ToggleHideBlock
  324.      MoveToBlockBegRaw   *WriteBlock
  325.  
  326.  Deletion/insertion
  327. --------------------
  328.  
  329.    These macros delete, undelete, and insert text.
  330.  
  331.      BackspaceDelete     DeleteToEOL
  332.      ClipClear           DeleteChar
  333.      ClipCopy            DeleteWord
  334.      ClipCut             EditMenu
  335.      ClipPaste           InsertText
  336.      ClipShow            LiteralChar
  337.      DeleteBlock         RestoreLine
  338.      DeleteBlockRaw      SetInsertMode
  339.      DeleteLine          ToggleInsert
  340.  
  341.  Search macro
  342. --------------
  343.  
  344.    These macros deal with searching.
  345.  
  346.      GetFindString       RepeatSearch
  347.      MatchPairForward    Replace
  348.      MatchPairBackward   SearchMenu
  349.  
  350.  
  351.  Hot key macros
  352. ----------------
  353.  
  354.    These macros duplicate the hot keys in the Integrated
  355.    Development Environment.
  356.  
  357.     *AddWatch           *ResetProgram
  358.     *CloseWindow        *RunProgram
  359.     *CompileFile        *RunToHere
  360.     *Help               *SaveFile
  361.     *LastHelp           *SetBreakpoint
  362.     *Menu               *Step
  363.     *Modify             *Trace
  364.     *NextWindow         *ZoomWindow
  365.     *OpenFile
  366.  
  367.  
  368.  Screen movement
  369. -----------------
  370.  
  371.    These macros control cursor movement and screen movement.
  372.  
  373.      BottomOfScreen      MoveToPrevPos
  374.      BottomOfScreenRaw   PageDown
  375.      CenterFixScreenPos  PageUp
  376.      CursorCharLeft      PageScreenDown
  377.      CursorCharRight     PageScreenUp
  378.      CursorDown          RightOfLine
  379.      CursorLeft          ScrollDown
  380.      CursorRight         ScrollUp
  381.      CursorUp            ScrollScreenDown
  382.      EndCursor           ScrollScreenUp
  383.      EndCursorRaw        SetMark
  384.      FixCursorPos        SetPrevPos
  385.      FixScreenPos        SwapPrevPos
  386.      HomeCursor          TopOfScreen
  387.      HomeCursorRaw       TopOfScreenRaw
  388.      LeftOfLine          WordLeft
  389.      MoveToMark          WordRight
  390.  
  391.  
  392.  System macros
  393. ---------------
  394.  
  395.    These macros affect certain system functions.
  396.  
  397.     *Exit                *Quit
  398.      FullPaintScreen      SmartRefreshScreen
  399.      PaintScreen
  400.  
  401.  
  402.  Alphabetical reference
  403. ========================
  404.  
  405.    This section is an alphabetical list of all the built-in macros. If
  406.    you need to see how the macros are grouped by function, refer to
  407.    the preceding section.
  408.  
  409.     AddWatch - This macro is the same as pressing Ctrl-F7 or
  410.       Debug|Watches|Add Watch.
  411.  
  412.     BackspaceDelete - Moves the cursor back one character and deletes
  413.       it (typically defined to be Backspace).
  414.  
  415.     BottomOfScreen - Moves the cursor position to the lower left
  416.       corner of the screen. This macro automatically sets the starting
  417.       cursor position so that you can go back there with the
  418.       MoveToPrevPos macro.
  419.  
  420.     BottomOfScreenRaw - Moves the cursor to the lower left corner of
  421.       the screen. As opposed to the BottomOfScreen macro, this command
  422.       does not change the "previous cursor" location, which you access
  423.       with the SwapPrevPos and MoveToPrevPos macros.
  424.  
  425.     BreakLine - Insert a line break at the current cursor location
  426.       leaving the cursor on the beginning of the next line. This macro
  427.       is the same as pressing Enter.
  428.  
  429.     CenterFixScreenPos - Corrects the screen image position relative
  430.       to the cursor. This command moves the screen image so that the
  431.       cursor is in the middle of it.
  432.  
  433.     ClipClear - Removes the selected text but does not change the
  434.       Clipboard. This macro is the same as pressing Ctrl-Del or
  435.       choosing Edit|Clear.
  436.  
  437.     ClipCopy - Copies the selected text so you can paste a copy of it
  438.       elsewhere. This macro is the same as pressing Ctrl-Ins or
  439.       choosing Edit|Copy.
  440.  
  441.     ClipCut - Cuts the selected text. This macro is the same as
  442.       pressing Shift-Del or choosing Edit|Cut.
  443.  
  444.     ClipPaste - Pastes the last-cut or last-copied text. This macro is
  445.       the same as pressing Shift-Ins or choosing Edit|Paste.
  446.  
  447.     ClipShow - Opens the Clipboard window.
  448.  
  449.     *CloseWindow - Close the current editor. This macro is the same as
  450.       pressing Alt-F3.
  451.  
  452.     CompileFile - Compiles the current file. This macro is the same as
  453.       pressing Alt-F9 or choosing the Compile|Compile to OBJ command.
  454.  
  455.     CopyBlock - Inserts a copy of the current block at the cursor
  456.       position. Unlike the CopyBlockRaw macro, this macro makes
  457.       sure that the cursor remains visible.
  458.  
  459.     CopyBlockRaw - Copies the block without ensuring the cursor
  460.       remains visible.
  461.  
  462.     CursorCharLeft - Moves the cursor one character to the left. (If
  463.       the cursor is at the beginning of a line, this command makes it
  464.       wrap to the previous printing character.)
  465.  
  466.     CursorCharRight - Moves the cursor one character to the right. (If
  467.       the cursor is at the end of a line, this command makes it wrap
  468.       to the next printing character.)
  469.  
  470.     CursorDown - Moves the cursor one line down, keeping it in the
  471.       same column.
  472.  
  473.     CursorLeft - Moves the cursor one column to the left.
  474.  
  475.     CursorRight - Moves the cursor one column to the right (even if
  476.       there are no characters there). If the cursor is at the edge of
  477.       the screen, this command moves the cursor off the visible
  478.       screen.
  479.  
  480.     CursorSwitchedLeft - Move the cursor one character left paying
  481.       attention to the roaming cursor mode. This macro is the same as
  482.       pressing Left Arrow or ^E.
  483.  
  484.     CursorSwitchedRight - Move the cursor one character right paying
  485.       attention to the roaming cursor mode. This macro is the same as
  486.       pressing Right Arrow or ^D.
  487.  
  488.     CursorUp - Moves the cursor one line up, keeping it in the same
  489.       column.
  490.  
  491.     DeleteBlock - Deletes the current block. Unlike the DeleteBlockRaw
  492.       macro, DeleteBlock leaves the cursor fixed in one spot on the
  493.       screen (it doesn't move when the block is deleted).
  494.  
  495.     DeleteBlockRaw - Deletes the current block. Unlike the DeleteBlock
  496.       macro, this "raw" macro doesn't fix the cursor in one spot on
  497.       the screen (it can move when the block is deleted).
  498.  
  499.     DeleteChar - Deletes the character at the cursor position.
  500.  
  501.     DeleteLine - Deletes the line the cursor is on.
  502.  
  503.     DeleteToEOL - Deletes from the cursor position to the end of the
  504.       line.
  505.  
  506.     DeleteWord - Deletes the word the cursor is on plus the space
  507.       characters after it.
  508.  
  509.     EndCursor - Moves the cursor to the end of the file. This macro
  510.       automatically sets the previous cursor position so that you can
  511.       go back there with the MoveToPrevPos macro.
  512.  
  513.     EndCursorRaw - Moves the cursor to the end of the file. As opposed
  514.       to the EndCursor macro, this command does not reset the
  515.       "previous cursor" location, which you access with the
  516.       SwapPrevPos and MoveToPrevPos macros.
  517.  
  518.     Exit - Exits from the editor.
  519.  
  520.     FixCursorPos - Corrects the cursor position in respect to the
  521.       screen. This command moves the cursor to the visible screen by
  522.       making the least amount of movement possible, the result being
  523.       that the cursor appears at the start or the end of the screen.
  524.  
  525.     FixScreenPos - Corrects the screen position in respect to the
  526.       cursor. This command moves the screen image to the cursor by
  527.       making the least amount of movement possible, the result being
  528.       that the screen appears above or below the cursor position.
  529.  
  530.     FullPaintScreen - Forces a full refresh of the screen. This paints
  531.       out to the edge of the screen; it is slower than PaintScreen.
  532.  
  533.     GetFindString - Opens the Find dialog box so you can search for a
  534.       text string. The search begins at the current cursor position.
  535.  
  536.     Help - Opens the Help window, just like the Help|Table of Contents
  537.       command. This macro is the same as pressing F1.
  538.  
  539.     HighlightBlock - Highlights the current marked block.
  540.  
  541.     HomeCursor - Moves the cursor position to the beginning of the
  542.       file. This macro automatically sets the starting cursor position
  543.       so that you can go back there with the MoveToPrevPos macro.
  544.  
  545.     HomeCursorRaw - Moves the cursor to the beginning of the file. As
  546.       opposed to the HomeCursor macro, this command does not change
  547.       the "previous cursor" location, which you access with the
  548.       SwapPrevPos and MoveToPrevPos macros.
  549.  
  550.     IndentBlock - Indents a block one space. This macro is the same as
  551.       pressing ^K^I.
  552.  
  553.     InsertText("string") - Inserts string at the current cursor
  554.       position. The double quotes are required around string; string
  555.       can be up to 4,096 characters long.
  556.  
  557.     LastHelp - Opens the Help window that was last viewed, just like
  558.       the Help|Previous Topic command. This macro is the same as
  559.       pressing Alt-F1.
  560.  
  561.     LeftOfLine - Moves the cursor to the beginning of the line
  562.       (typically defined to be Home).
  563.  
  564.     LiteralChar - Inserts the next key pressed verbatim into the file
  565.       (such as Ctrl-P).
  566.  
  567.     *MakeProject - To a make of the current editor or primary file.
  568.       This macro is the same as pressing F9.
  569.  
  570.     MarkLine - Set the block mark to mark the current line. This macro
  571.       is the same as pressing ^K^L.
  572.  
  573.     MarkWord - Mark the word at the location of the cursor. This macro
  574.       is the same as pressing ^K^T.
  575.  
  576.     MatchPairBackward - Finds the matching delimiter character that
  577.       complements the one at the current cursor position. Searches
  578.       backward (to the beginning) in the file.
  579.  
  580.     MatchPairForward - Finds the matching delimiter character that
  581.       complements the one at the current cursor position. Searches
  582.       forward (to the end) in the file.
  583.  
  584.     *Menu - Makes the menu bar active. This macro is the same as
  585.       pressing F10.
  586.  
  587.     Modify - This macro is the same as pressing Ctrl-F4 or
  588.       Debug|Evaluate/Modify.
  589.  
  590.     MoveBlock - Moves the current block to the cursor position. Unlike
  591.       the MoveBlockRaw macro, this macro highlights the new block.
  592.  
  593.     MoveBlockRaw - Moves a block without ensuring the cursor remains
  594.       visible.
  595.  
  596.     MoveToBlockBeg - Moves the cursor to the beginning of the current
  597.       block. Unlike the MoveToBlockBegRaw macro, this macro updates
  598.       the cursor on the screen and changes the "previous cursor"
  599.       location, which you access with the SwapPrevPos and
  600.       MoveToPrevPos macros.
  601.  
  602.     MoveToBlockBegRaw - Moves the cursor to the beginning of the
  603.       current block. Unlike the MoveToBlockBeg macro, this "raw" macro
  604.       doesn't update the cursor onscreen and doesn't change the
  605.       "previous cursor" location, which you access with the
  606.       SwapPrevPos and MoveToPrevPos macros.
  607.  
  608.     MoveToBlockEnd - Moves the cursor to the end of the current block.
  609.       Unlike the MoveToBlockEndRaw macro, this macro updates the
  610.       cursor onscreen and changes the "previous cursor" location,
  611.       which you access with the SwapPrevPos and MoveToPrevPos macros.
  612.  
  613.     MoveToBlockEndRaw - Moves the cursor to the end of the current
  614.       block. Unlike the MoveToBlockEnd macro, this "raw" macro doesn't
  615.       update the cursor onscreen and doesn't change the "previous
  616.       cursor" location, which you access with the SwapPrevPos and
  617.       MoveToPrevPos macros.
  618.  
  619.     MoveToMark(number) - Moves the cursor to the location designated
  620.       by the SetMark(number) macro. You can set 10 marks by passing
  621.       SetMark a parameter of 0 to 9. You move the cursor to any of the
  622.       10 marks by passing the corresponding number (0-9) to the
  623.       MoveToMark(number) macro.
  624.  
  625.     MoveToPrevPos - Moves the cursor to the position designated by the
  626.       SetPrevPos macro.
  627.  
  628.     MoveToTempPos - Moves to the temporary mark position.
  629.  
  630.     *NextWindow - Make the window in the window list active. This
  631.       macro is the same as pressing F6.
  632.  
  633.     OpenFile - Displays the Open dialog box. This macro is the same as
  634.       pressing F3.
  635.  
  636.     OpenLine - Break the line at the current location leaving the
  637.       cursor at the end of the current line.
  638.  
  639.     OutdentBlock - Unindents a block one space. This macro is the same
  640.       as pressing ^K^U.
  641.  
  642.     PageDownRaw - Page the display and cursor down one screen but does
  643.       not ensure the screen is displaying the cursor.
  644.  
  645.     PageDownScrolls - both the screen and cursor down one page.
  646.  
  647.     PageScreenDown - Moves the screen down one screenful, possibly
  648.       moving the cursor out of view (typically defined to be PgDn).
  649.  
  650.     PageScreenUp - Moves the screen up one screenful, possibly moving
  651.       the cursor out of view (typically defined to be PgUp).
  652.  
  653.     PageUp - Scrolls both the screen and cursor up one page.
  654.       (Typically defined to be PgUp.)
  655.  
  656.     PageUpRaw - Page the display and cursor up one screen but does not
  657.       ensure the screen is displaying the cursor.
  658.  
  659.     PaintScreen - Forces a full refresh of the screen. PaintScreen
  660.       only paints lines from the buffer; it assumes it knows how to
  661.       blank end-of-lines. It's faster than FullPaintScreen.
  662.  
  663.     *PrintBlock - Print the currently marked block. This macro is the
  664.       same as pressing ^K^P.
  665.  
  666.     Quit - Exits from the integrated environment. If you've made
  667.       changes you haven't saved, you'll be given a chance to save them
  668.       before quitting. This macro is the same as pressing Alt-X.
  669.  
  670.     ReadBlock - Lets you open a text file and insert it at the cursor
  671.       position. The ReadBlock macro automatically opens the Open
  672.       dialog box so you can choose a file to open.
  673.  
  674.     RepeatSearch - Searchs for the text string that was last entered
  675.       in the find dialog box using the GetFindString macro.
  676.  
  677.     Replace - Opens the Replace dialog box so you can search for and
  678.       replace text.
  679.  
  680.     ResetProgram - Resets the current program. This macro is the same
  681.       as pressing Ctrl-F2 or choosing Run|Program Reset.
  682.  
  683.     RestoreLine - Inserts the line deleted with the DeleteLine macro.
  684.       If the cursor has moved to another line since the DeleteLine
  685.       macro, this macro does nothing.
  686.  
  687.     RightOfLine - Moves the cursor to the end of the line (typically
  688.       defined to be End).
  689.  
  690.     RightOfWord - Moves the cursor to the right of a word.
  691.  
  692.     RunProgram - Runs the current program. This macro is the same as
  693.       pressing Ctrl-F9 or choosing the Run|Run command.
  694.  
  695.     RunToHere - Runs a program up to the line containing the cursor.
  696.       This macro is the same as pressing F4 or choosing Run|Go to
  697.       Cursor.
  698.  
  699.     SaveFile - Saves the file in the current window. This macro is the
  700.       same as pressing F2 or choosing the File|Save command.
  701.  
  702.     ScrollDown - Scrolls the screen down one line. This macro will not
  703.       allow the cursor to scroll out of view.
  704.  
  705.     ScrollScreenDown - Moves the screen down one line, leaving the
  706.       cursor at the same relative position in the file. This command
  707.       will allow the cursor to scroll out of view.
  708.  
  709.     ScrollScreenUp - Moves the screen up one line, leaving the cursor
  710.       at the same relative position in the file. This command will
  711.       allow the cursor to scroll out of view.
  712.  
  713.     ScrollUp - Scrolls the screen up one line. This command will not
  714.       allow the cursor to scroll out of view.
  715.  
  716.     SetAutoIndent - Turn on auto-indent mode. The following macro will
  717.       turn off auto-indent mode,
  718.  
  719.         Macro ClearAutoIndent
  720.           SetAutoIndent;
  721.           ToggleAutoIndent;
  722.         end;
  723.  
  724.     SetAutoOutdent - Turn on auto-outdent mode. The following macro
  725.       will turn off auto-outdent mode,
  726.  
  727.         Macro ClearAutoOutdent
  728.           SetAutoOutdent;
  729.           ToggleAutoOutdent;
  730.         end;
  731.  
  732.     SetBlockBeg - Marks the current cursor position as the beginning
  733.       of a block. Unlike the SetBlockBegRaw macro, this macro
  734.       highlights the new block.
  735.  
  736.     SetBlockBegRaw - Sets the beginning of the block without showing
  737.       the block.
  738.  
  739.     SetBlockEnd - Marks the current cursor position as the end of a
  740.       block. Unlike the SetBlockEndRaw macro, this macro highlights
  741.       the new block.
  742.  
  743.     SetBlockEndRaw - Sets the end position of the block without
  744.       showing the block.
  745.  
  746.     SetBreakpoint - Sets a breakboint at the cursor position. This
  747.       macro is the same as pressing Ctrl-F8 or choosing Debug|Toggle
  748.       Breakpoint.
  749.  
  750.     SetInsertMode - Turns insert mode on. To turn it off, type
  751.  
  752.        BEGIN SetInsertMode; Toggle Insert END;
  753.  
  754.     SetMark(number) - Sets the current cursor position so that you can
  755.       return to it using the MoveToMark(number) macro. You can set
  756.       number to any number from 0 to 9. You move the cursor to any of
  757.       the 10 marks by passing the corresponding number (0-9) to the
  758.       MoveToMark(number) macro.
  759.  
  760.     SetOptimalFillMode - Turn on optimal fill mode. The following
  761.       macro will turn off optimal fill mode,
  762.  
  763.         Macro ClearOptimalFillMode
  764.           SetOptimalFillMode;
  765.           ToggleOptimalFillMode;
  766.         end;
  767.  
  768.     SetPrevPos - Marks the current cursor position as the place to
  769.       return to when you use the SwapPrevPos or MoveToPrevPos macros.
  770.       Many macros implicitly set the "previous position" (the notable
  771.       exceptions are "raw" macros).
  772.  
  773.     SmartRefreshScreen - Refreshes only the parts of the screen that
  774.       have changed.
  775.  
  776.     SetRoamingCursorMode - Turn on roaming cursor mode. The following
  777.       macro will turn off roaming cursor mode,
  778.  
  779.         Macro ClearRoamingCursorMode
  780.           SetRoamingCursorMode;
  781.           ToggleRoamingCursorMode;
  782.         end;
  783.  
  784.     SetTabbingMode - Turn on tabbing mode. The following macro will
  785.       turn off tabbing mode,
  786.  
  787.         Macro ClearTabbingMode
  788.           SetTabbingMode;
  789.           ToggleTabbingMode;
  790.         end;
  791.  
  792.     SetTempPos - Sets the temporary mark position.
  793.  
  794.     SmartTab - Smart tab is the default binding of the Tab key. It
  795.       will either insert spaces or a tab character depending on the
  796.       tabbing mode.
  797.  
  798.     Step - Runs a program one statement at a time but stepping over
  799.       subroutines. This macro is the same as pressing F8 or choosing
  800.       Run|Step Over.
  801.  
  802.     SwapPrevPos - Switches the current cursor position with the spot
  803.       designated by the SetPrevPos macro.
  804.  
  805.     ToggleAutoIndent - Toggles the auto-indent mode. This macro is the
  806.       same as pressing ^O^I.
  807.  
  808.     ToggleAutoOutdent - Toggles the auto-outdent mode. This macro is
  809.       the same as pressing ^O^U.
  810.  
  811.     ToggleHideBlock - Highlights or hides the current marked block.
  812.  
  813.     ToggleInsert - Switches insert modes, from Insert to Overwrite or
  814.       from Overwrite to Insert.
  815.  
  816.     ToggleOptimalFillMode - Toggle the optimal fill mode. This macro
  817.       is the same as pressing ^O^F.
  818.  
  819.     ToggleRoamingCursorMode - Toggle the roaming cursor mode. This
  820.       macro is the same as pressing ^O^R.
  821.  
  822.     ToggleTabbingMode - Toggle the tabbing mode. This macro is the
  823.       same as pressing ^O^T.
  824.  
  825.     TopOfScreen - Moves the cursor to the upper left corner of the
  826.       screen. This macro automatically sets the previous cursor
  827.       position so that you can go back to it with the MoveToPrevPos
  828.       macro.
  829.  
  830.     TopOfScreenRaw - Moves the cursor to the upper left corner of the
  831.       screen. screen. As opposed to the TopOfScreen macro, this
  832.       command does not change the "previous cursor" location, which
  833.       you access with the SwapPrevPos and MoveToPrevPos macros.
  834.  
  835.     Trace - Runs a program one statement at a time, moving into
  836.       subroutines as necessary. This macro is the same as pressing F7
  837.       or choosing Run|Trace Into.
  838.  
  839.     ViewUserScreen - Switches views to the User Screen. This macro is
  840.       the same as pressing Alt-F5 or choosing the Window|User Screen
  841.       command.
  842.  
  843.     *WordHelp - Bring up help on the word at the current cursor
  844.       position.
  845.  
  846.     WordLeft - Moves the cursor one word to the left, placing it on
  847.       the first character of that word.
  848.  
  849.     WordRight - Moves the cursor one word to the right, placing it on
  850.       the first character of that word.
  851.  
  852.     WriteBlock - Lets you save the current block to a file. The
  853.       WriteBlock macro automatically opens the Write Block to File
  854.       dialog box so you can enter a file name.
  855.  
  856.     *ZoomWindow - Zoom the current editor. This macro is the same as
  857.       pressing F5.
  858.  
  859.  
  860. ===================
  861.  5. Error messages
  862. ===================
  863.  
  864.    While coding your macros, you may encounter certain errors.
  865.    Knowing the compiler capacity may help you avoid some of those
  866.    errors, which are given after this list of memory requirements.
  867.  
  868.     o each macro invocation takes 1 byte
  869.  
  870.     o each integer parameter takes 2 bytes
  871.  
  872.     o each character parameter takes (number_of_characters_in_string +
  873.       1) bytes
  874.  
  875.     o each macro requires 1 byte for end
  876.  
  877.  
  878.    Cannot allocate memory for file.
  879.      Not enough memory is available to process the file. TEMC needs
  880.      about 100K of available space to compile a file.
  881.  
  882.    Expected item.
  883.      The line indicated is most likely missing the specified item.
  884.  
  885.    File filename could not be created.
  886.      The file specified for output cannot be created. Either the disk
  887.      is full or you do not have rights to the current network drive or
  888.      the name specified is not legal.
  889.  
  890.    File filename is empty.
  891.      The file passed to TEMC to compile has nothing in it.
  892.  
  893.    File filename larger than 64K.
  894.      The script file is larger than the maximum 64K in size.
  895.  
  896.    File filename not found.
  897.      The file specified does not exist.
  898.  
  899.    Invalid key.
  900.      Key specified is not recognized.
  901.  
  902.    Invalid symbol.
  903.      The symbol specified is not a valid TEMC symbol.
  904.  
  905.    Out of memory.
  906.      Not enough memory is available to process the file. TEMC needs
  907.      about 100K of available space to compile a file.
  908.  
  909.    Read error on file filename.
  910.      TEMC could not read the file source file.
  911.  
  912.    Redefinition of key.
  913.      This key is defined elsewhere in the file.
  914.  
  915.    Redefinition of macro macro.
  916.      This macro is defined elsewhere in the file.
  917.  
  918.    Parameters to a macro call illegal.
  919.      Macros cannot have parameters. Trying to pass a parameter to a
  920.      Script too complex. One or more of the following conditions need
  921.      to be corrected:
  922.  
  923.     o Too many keys defined.
  924.  
  925.     o String parameter is too long (the maximum string length is 256
  926.       characters).
  927.  
  928.     o Too many parameters.
  929.  
  930.     o Macro size may be too large (the maximum size allowed is 1,024
  931.       bytes).
  932.  
  933.    Undefined symbol symbol.
  934.      The symbol specified has not yet been defined.
  935.  
  936.    Unexpected item.
  937.      The indicated line most likely would be correct if the item
  938.      specified was deleted or changed.
  939.  
  940.    Unexpected end of file.
  941.      The last macro or BEGIN/END pair was not terminated.
  942.