home *** CD-ROM | disk | FTP | other *** search
/ Amiga Format 91 / af091a.adf / af91a1.lzx / Docs / ref.doc < prev    next >
Text File  |  2016-03-28  |  114KB  |  2,836 lines

  1.                   +----------+
  2.                    | ACE v2.4 |
  3.                  +----------+
  4.  
  5.                +--------------------------------+
  6.                | Command and Function Reference | 
  7.                +--------------------------------+
  8.  
  9.                  ------------
  10.                  Introduction
  11.                  ------------
  12.  
  13. This document consists of a description of currently implemented commands 
  14. and functions.
  15.  
  16. As with AmigaBASIC, the case of commands and functions is of no consequence.
  17.  
  18. NOTES:     - [] means that a parameter or command component is optional.    
  19.           - <> surround literals, names and expressions.
  20.           - .. implies that statements are expected to follow.
  21.  
  22.     - Commands and functions marked with an asterix are found only in ACE, 
  23.       not AmigaBASIC.
  24.  
  25.     - Standard trigonometric functions take their arguments in radians.
  26.  
  27.     - EOS = end-of-string character (ASCII 0).
  28.     - MAXSTRINGLEN currently equals 1024. The last character in a string 
  29.       is EOS, so if you want a string which holds 1024 characters, you 
  30.       need a 1025 byte string (see STRING command).
  31.  
  32.     - For boolean operators such as AND,OR,IMP etc the values T and F
  33.       (TRUE and FALSE) refer to -1 and 0 respectively.
  34.  
  35. --------------------------------------------------------------------------------
  36. ABS        - syntax: ABS(n)
  37.         - Returns the absolute value of n. 
  38.  
  39. --------------------------------------------------------------------------------
  40. ADDRESS    *    - syntax: ADDRESS <identifier>[,..]
  41.         - Declares and initialises one or more variables of type
  42.           address. In fact, this data type is synonymous with the 
  43.           long integer (see LONGINT) data type. Its main purpose 
  44.           is to make clear just what sort of data is going to be
  45.           used. This is especially useful when passing addresses 
  46.           as parameters to subprograms.
  47.         - See also SUB..END SUB, STRUCT.
  48.   
  49. --------------------------------------------------------------------------------
  50. ALLOC *        - syntax: ALLOC(<bytes>[,<memory-type>])
  51.         - This is ACE's hassle-free memory allocator.
  52.         - You can call this function to get the start address of a 
  53.           newly allocated block of memory at least <bytes> bytes in 
  54.           size.
  55.         - The <memory-type> argument can be one of the following:
  56.           
  57.             0 = CHIP memory
  58.             1 = FAST memory
  59.             2 = PUBLIC memory
  60.  
  61.             3 = CLEARED CHIP memory
  62.             4 = CLEARED FAST memory
  63.             5 = CLEARED PUBLIC memory
  64.  
  65.             6 = ANY suitable memory (MEMF_ANY)
  66.             7 = ANY suitable cleared memory
  67.  
  68.         - If a value outside this range is specified or this 
  69.           parameter is omitted, the result is identical to having
  70.           specified a <memory-type> of 7. Note that in ACE v2.0 the 
  71.           default was CLEARED PUBLIC memory. 
  72.         - Specifying ANY (6,7) allows the operating system to select
  73.           the best available memory, so specify a <memory-type> of 6 
  74.           or 7 for general use and CHIP memory for sound samples or 
  75.           any other data which must be accessible by the co-processors.
  76.         - If the requested block of memory can't be allocated
  77.           for whatever reason (eg. memory is too fragmented),
  78.           ALLOC returns zero.
  79.         - CLEARED memory is filled with zeros.
  80.         - The main benefit of ALLOC is that it keeps a record of
  81.           memory allocations, freeing all memory allocated via it 
  82.           at the end of a program run.
  83.         - ALLOC will free allocated memory even if a program aborts 
  84.           due to a ctrl-c break or an error (except where a GURU 
  85.           results).
  86.         - Use of ALLOC assumes that you know what you're doing with
  87.           memory and why you want a chunk of it.
  88.         - For more information about memory allocation on the Amiga,
  89.           see the Exec/Intuition autodocs re: AllocMem()/FreeMem()
  90.           and AllocRemember()/FreeRemember(). See also the manual
  91.           "RKM: Libraries". 
  92.         - See also CLEAR ALLOC.
  93.  
  94. --------------------------------------------------------------------------------
  95. AND        - Boolean operator: X AND Y.
  96.  
  97.             X Y    Out
  98.             -----------
  99.             T T    T
  100.             T F     F
  101.             F T      F
  102.             F F    F        
  103.         
  104. --------------------------------------------------------------------------------
  105. ARG$ *        - syntax: ARG$(n) where n=0..ARGCOUNT.
  106.         - Returns the nth command line argument as a string. 
  107.         - If n=0 the name of the command is returned.
  108.         - Note that ARG$ only works for CLI/Shell launched 
  109.           programs. See ace.doc for details about how to access
  110.           Workbench arguments.
  111.         - See also ARGCOUNT.
  112.  
  113. --------------------------------------------------------------------------------
  114. ARGCOUNT *    - Returns the number of command line arguments.
  115.         - See also ace.doc re: Workbench arguments.
  116.  
  117. --------------------------------------------------------------------------------
  118. AREA        - syntax: AREA [STEP](x,y)
  119.         - Functions indentically to AmigaBASIC's AREA command.
  120.         - Defines a set of up to 20 points to be joined
  121.           into a polygon and filled by AREAFILL.
  122.  
  123. --------------------------------------------------------------------------------
  124. AREAFILL    - syntax: AREAFILL [mode]
  125.         - Same as AmigaBASIC's AREAFILL command.
  126.         - The optional mode can be 0 or 1:
  127.             
  128.             0 = fill polygon with current pattern and 
  129.                 foreground color.
  130.  
  131.             1 = fill polygon with current pattern 
  132.                 but inverse of foreground color 
  133.                 (max-color-id - fdgnd-color-id).
  134.         
  135.         - See also PATTERN command.
  136.  
  137. --------------------------------------------------------------------------------
  138. ASC        - syntax: ASC(X$)
  139.         - Returns the ASCII code of the first character in X$.
  140.  
  141. --------------------------------------------------------------------------------
  142. ASSEM *        - syntax: ASSEM
  143.                 <line of assembly code>
  144.                 <line of assembly code>
  145.                 .
  146.                 .
  147.               END ASSEM
  148.         - This allows for the inline inclusion of assembly source
  149.           code into the A68K file generated by ACE.
  150.         - ACE does not attempt to check the correctness of the
  151.           inline code, leaving the task of assembly up to A68K.
  152.         - If you use this facility, it is assumed that you know
  153.           what you are doing.        
  154.         - For correct handling of the assembly source lines,
  155.           do not place ASSEM or END ASSEM on the same line as
  156.           any of the code you wish to include.
  157.         
  158. --------------------------------------------------------------------------------
  159. ATN        - syntax: ATN(n)
  160.         - Returns the arctangent of n.
  161.  
  162. --------------------------------------------------------------------------------
  163. BACK *        - syntax: BACK n        
  164.         - Moves the turtle back n steps.
  165.  
  166. --------------------------------------------------------------------------------
  167. BEEP        - Issues a brief pulse from the speaker.
  168.          - BEEP doesn't flash the screen as it does in AmigaBASIC.
  169.         - This command is useful for alerting the user to an error
  170.           or other important event.
  171.  
  172. --------------------------------------------------------------------------------
  173. BEVELBOX *    - syntax: BEVELBOX (x1,y1)-(x2,y2),style
  174.         - This command renders a Wb 2.x/3.0 style 3D bevel-box
  175.           according to the specified rectangle and style.
  176.         - The style parameter can take on the following values:
  177.  
  178.           Style        Bevel-Box
  179.           -----        ---------
  180.           1        RAISED
  181.           2        RECESSED
  182.           3        STRING-GADGET STYLE
  183.  
  184.         - The style parameter will have different results 
  185.           depending upon the combination of foreground and 
  186.           background colours. The above styles hold true for 
  187.           the standard Workbench 2.x colours.
  188.  
  189. --------------------------------------------------------------------------------
  190. BIN$ *        - syntax: BIN$(n)
  191.         - Returns a string containing the binary equivalent of n.
  192.         - If n is a single-precision value, ACE coerces it to integer.
  193.  
  194. --------------------------------------------------------------------------------
  195. BLOCK *        - The BLOCK construct permits arbitrarily large collections of
  196.           statements where one would normally be expected. The syntax is:
  197.  
  198.             BLOCK
  199.               statement1
  200.               .
  201.               .
  202.               statementN
  203.             END BLOCK
  204.  
  205.         - Intended uses are with If..Then..Else which obviates the 
  206.           need for If..Then..Else..End If, eg.
  207.  
  208.  
  209.             If x = 1 Then Block
  210.                  Print "1"
  211.                  Print "cool!"
  212.             End Block Else 
  213.             If x = 2 Then Block
  214.                 Print "2"
  215.                 ++x
  216.                 Print x
  217.             End Block
  218.  
  219.           or in a CASE statement to avoid the need for the line 
  220.           continuation character, eg.
  221.  
  222.             Case 
  223.                 x = 1 : Block
  224.                         Print "hello ";
  225.                         Print "world"
  226.                     End Block
  227.  
  228.                x = 2 : Block
  229.                         Print "yo ";
  230.                         Print "ho"
  231.                     End Block
  232.             End Case
  233.  
  234.           but no doubt there are other uses.
  235.  
  236.         - The statement block may also be empty.
  237.         - Be aware that for commands which are line-feed sensitive
  238.           (eg. IF..THEN..ELSE as opposed to IF..THEN..ELSE..END IF)
  239.           the use of BLOCK doesn't change this, hence the placement
  240.             of each "Else" in the first example above is not arbitrary.
  241.           Of course, the line-continuation character can be used to
  242.           help with this, eg. notice the slight change after the first
  243.           "End Block":
  244.  
  245.             If x = 1 Then Block
  246.                  Print "1"
  247.                  Print "cool!"
  248.             End Block ~
  249.             Else 
  250.             If x = 2 Then Block
  251.                 Print "2"
  252.                 ++x
  253.                 Print x
  254.             End Block
  255.      
  256.         - While most modern structured languages have some block
  257.           facility which is usually an integral component, BASIC's
  258.           line-numbered sensitivity has made blocks second-class. 
  259.           ACE's BLOCK construct is an attempt to make them first
  260.           class again by permitting the use of multiple statements
  261.           in contexts other than control constructs like WHILE, 
  262.           REPEAT, and IF..THEN..ELSE..END IF.
  263.  
  264. --------------------------------------------------------------------------------
  265. BREAK        - syntax: BREAK ON|OFF|STOP 
  266.         - These commands are used for enabling, disabling and 
  267.           suspending ON BREAK event trapping.
  268.         - See the Event Trapping section in ace.doc.
  269.         
  270. --------------------------------------------------------------------------------
  271. CALL        - Passes control to a user-defined subprogram, 
  272.           shared library function, external function, 
  273.           or user-defined machine code routine.
  274.         - Subprogram CALLs can be recursive in ACE. 
  275.         - See also sections on subprograms, shared library access,
  276.           external functions and machine code calls in ace.doc.
  277.  
  278. --------------------------------------------------------------------------------
  279. CASE *        - This is ACE's version of the CASE statement and is different 
  280.           from the Pascal CASE and C switch statements.
  281.         - The syntax is:
  282.             
  283.             CASE
  284.               <expression> : <statement>
  285.               .
  286.               .
  287.              [<expression> : <statement>]
  288.             END CASE
  289.  
  290.            where <expression> can be any legal expression ranging
  291.            from a constant to a relational or mathematical expression.
  292.  
  293.         - The expression is used as a boolean such that 0 is false
  294.           and any non-zero value is true. 
  295.         - Each expression is evaluated until one is found to be
  296.           true. The corresponding statement is then executed.
  297.         - The statement can consist of a single legal ACE statement
  298.           (including block IF and loops) or a multi-statement.
  299.  
  300. --------------------------------------------------------------------------------
  301. CHDIR        - syntax: CHDIR <dirname>
  302.  
  303.           where <dirname> is a string corresponding to the name of
  304.           a directory.
  305.  
  306.         - If <dirname> is a legitimate directory and is accessible
  307.            from the current directory, it will become the new current
  308.           directory. 
  309.         - In short, this is ACE's equivalent of the AmigaDOS "cd"
  310.           command, the only difference being that the path change
  311.           is not reflected in the shell prompt (if the program is
  312.           run from the shell).
  313.  
  314. --------------------------------------------------------------------------------
  315. CHR$        - syntax: CHR$(n)
  316.         - Returns a string consisting of a single character with the
  317.           ASCII value n.
  318.   
  319. --------------------------------------------------------------------------------
  320. CINT        - syntax: CINT(n)
  321.         - Converts n to a signed short integer by rounding the 
  322.           fractional portion.
  323.         - When the fractional portion is exactly .5, CINT *always*
  324.           rounds up in ACE, whereas in AmigaBASIC if the integer
  325.           portion is even, CINT rounds down, and up if the integer
  326.           portion is odd.
  327.  
  328. --------------------------------------------------------------------------------
  329. CIRCLE        - syntax: CIRCLE (x,y),radius[,color-id,start,end,aspect]
  330.         - Start and end angles are specified in DEGREES *not* radians
  331.           because this is probably more useful when thinking about 
  332.           circles. (Note: this may be changed to radians in future).
  333.         - If a whole ellipse is to be drawn, the graphics library
  334.           DrawEllipse() function is used. However, if the start
  335.           angle is not 0 or the end angle is not 359 (these are
  336.           the defaults when not specified), a different routine 
  337.           is used. The latter is quite slow and may well be changed
  338.           in a future release of ACE.
  339.         - The default ASPECT is .44 as in AmigaBASIC.
  340.  
  341. --------------------------------------------------------------------------------
  342. CLEAR ALLOC *    - syntax: CLEAR ALLOC
  343.         - Frees all memory allocated by calls to ALLOC.
  344.         - Subsequent use of ALLOC is permitted.
  345.         - This allows for a more intelligent use of memory
  346.           allocation, especially when memory is tight.
  347.  
  348. --------------------------------------------------------------------------------
  349. CLNG        - syntax: CLNG(n)
  350.         - Converts n to a signed long integer by rounding the 
  351.           fractional portion.
  352.         - When the fractional portion is exactly .5, CLNG *always*
  353.           rounds up in ACE, whereas in AmigaBASIC if the integer
  354.           portion is even, CLNG rounds down, and up if the integer
  355.           portion is odd.
  356.  
  357. --------------------------------------------------------------------------------
  358. CLOSE        - syntax: CLOSE [#]<fileNum>[,[#]<fileNum>..] 
  359.           where <fileNum> represents an open file.
  360.         - This command closes at least one open file. 
  361.         - Note that in ACE, CLOSE must be followed by at least one 
  362.           filenumber, unlike AmigaBASIC.
  363.         - See section on files in ace.doc.
  364.          - See also ERR.
  365.  
  366. --------------------------------------------------------------------------------
  367. CLS        - Clears the current output window or screen and sets the
  368.           pen position to the upper left corner.
  369.         - CLS does not affect any other screens or windows except 
  370.           the one which is currently active.
  371.  
  372. --------------------------------------------------------------------------------
  373. COLOR        - syntax: COLOR fgnd-id[,bgnd-id]
  374.         - Changes the foreground and/or background color to
  375.           fgnd-id and bgnd-id respectively.
  376.         - Note that in ACE, you can change just the foreground
  377.           color, both the foreground and background colors,
  378.           but not the background color alone. This may be changed 
  379.           in a future revision.
  380.         - The PALETTE command is used to change the colors 
  381.           corresponding to given color-ids.
  382.  
  383. --------------------------------------------------------------------------------
  384. COMMON *    - syntax: COMMON [<type>] <identifier>[%&!$]
  385.           where the optional <type> parameter is one of:
  386.  
  387.             ADDRESS,LONGINT,SHORTINT,SINGLE,STRING
  388.  
  389.         - A static variable (BSS object) is declared. The scope
  390.           of the variable is global to the current source module
  391.           from the point of the declaration onward, and the variable's 
  392.           name is also exported to other modules where it may be 
  393.           externally referenced via the External command.
  394.         - See also "Common and Global variables" in ace.doc.    
  395.          
  396. --------------------------------------------------------------------------------
  397. CONST *        - syntax: CONST <ident> = [+|-]<constant>[,..]
  398.           where <constant> is a signed numeric constant.
  399.         - Defines a named numeric constant or constants, the type
  400.           being *unaffected* by the the DEFxxx directives or type 
  401.           (%&!#$) suffixes. All constant definitions are GLOBAL.
  402.         - A number of definitions can be separated by commas.
  403.  
  404. --------------------------------------------------------------------------------
  405. COS        - syntax: COS(n)
  406.         - Returns the cosine of n.    
  407.  
  408. --------------------------------------------------------------------------------
  409. CSNG        - syntax: CSNG(n)
  410.         - Converts n to a single-precision value.
  411.  
  412. --------------------------------------------------------------------------------
  413. CSRLIN        - Returns the print line in the current user-defined screen
  414.           or window.
  415.         - CSRLIN and POS have no meaning in a CLI/shell and will
  416.           return 0 if used when a CLI/shell is the current output
  417.           window. 
  418.  
  419. --------------------------------------------------------------------------------
  420. CSTR *        - syntax: CSTR(<address>) 
  421.         - Coerces a long integer address into a string. 
  422.         - This is intended for taking an allocated area of memory
  423.           and using it as a string of characters. Be aware that this
  424.           memory block must be NULL terminated.
  425.         - A typical use for CSTR is something like this:
  426.         
  427.             x$=CSTR(addr&)
  428.  
  429.         - The maximum string length of MAXSTRINGLEN bytes in some 
  430.           functions still applies.
  431.  
  432. --------------------------------------------------------------------------------
  433. DATA        - syntax: DATA [numeric-constant | string-constant][,..]
  434.         - Stores numeric and/or string constants into a global
  435.           data list to be accessed by the READ statement.
  436.         - DATA statements may be located anywhere in a program and
  437.           are non-executable.
  438.         - Strings need only be enclosed in quotes if they contain 
  439.           commas, spaces or colons or other non-identifier characters.
  440.         - In ACE, all numbers from DATA statements are currently stored 
  441.           as single-precision values with a possible loss of accuracy 
  442.           if LARGE long integers are originally specified. This may
  443.           be rectified in a future revision. Thus far however, I have 
  444.           not had problems because of it. In order to overcome this,
  445.           do the following:
  446.  
  447.             READ X$
  448.             X&=LONGINT(X$)        
  449.             DATA "123456789"
  450.  
  451.         - In the above example, the BASIC function VAL is substituted 
  452.           with LONGINT because the former always returns a single
  453.           precision value which is what we are trying to avoid, while
  454.           the latter extracts a long integer from a string.
  455.  
  456. --------------------------------------------------------------------------------
  457. DATE$        - Returns the current system date as a ten-character string
  458.           of the format: mm-dd-yyyy.
  459.  
  460. --------------------------------------------------------------------------------
  461. DAY *        - Returns the day of the week as an integer from 0..6,
  462.           where 0=Sunday and 6=Saturday.
  463.         - The value returned by DAY reflects the last call to DATE$
  464.           and is otherwise undefined.
  465.  
  466. --------------------------------------------------------------------------------
  467. DECLARE        - This has four uses in ACE: 
  468.  
  469.           1. DECLARE FUNCTION [<type>] <func-name>[%&!#$][(param-list)] 
  470.                               LIBRARY [<lib-name>]
  471.  
  472.              (see section on shared library functions in ace.doc)
  473.  
  474.           2. DECLARE FUNCTION [<type>] <func-name>[%&!#$][(param-list)] 
  475.                                      EXTERNAL
  476.  
  477.              which declares an external function. See also 
  478.              EXTERNAL command.
  479.  
  480.              (see section on External References in ace.doc)
  481.  
  482.           3. DECLARE SUB [<type>] subprogram-name[(param-list)] 
  483.                              [EXTERNAL]
  484.  
  485.              which is used for forward SUB declarations. If
  486.              the EXTERNAL keyword is used the subprogram is
  487.                expected to be defined in another ACE module.
  488.              The reference will be resolved at link time.
  489.  
  490.              (see "Creating & using ACE subprogram modules" 
  491.               in ace.doc)
  492.  
  493.           In 1,2 and 3 above, <type> may be one of the following:
  494.         
  495.             ADDRESS,LONGINT,SHORTINT,SINGLE,STRING
  496.  
  497.           while param-list consists of comma-separated identifiers
  498.           each optionally preceded by one of the above type 
  499.           specifiers.
  500.  
  501.           4. DECLARE STRUCT <type> [*] <ident1> [,[*] <identN>..]
  502.              
  503.              where a structure variable of type <struct-type> is
  504.              created. If "*" precedes the variable identifier,
  505.              a pointer to the structure is created, otherwise
  506.              a BSS object is allocated. In both cases, "identN"
  507.              holds the start address of the structure. In the
  508.              latter case, the address is resolved at load time
  509.              while in the former, the address is allocated at
  510.              run time (eg: with ALLOC).
  511.  
  512.         - Only the first usage is supported by AmigaBASIC (but 
  513.           without type specifier keywords).
  514.  
  515. --------------------------------------------------------------------------------
  516. DEF FN        - syntax: 
  517.           DEF [FN]funcname[!#%&$] [(param-list)] [EXTERNAL] = <expr>
  518.  
  519.         - As an extension to this syntax, in ACE it is also possible
  520.           to follow the DEF keyword with one of the following:
  521.     
  522.             ADDRESS,LONGINT,SHORTINT,SINGLE,STRING
  523.  
  524.         - These keywords may also precede each item in the
  525.           parameter list.
  526.         - This command provides the simple defined function
  527.           capability found in many BASICs.
  528.         - The parameters are passed by value and are combined
  529.           in the expression on the right hand side of the "=" to
  530.           yield a function return value.
  531.         - Like a subprogram, a defined function in ACE doesn't have
  532.           access to global variables. Unlike the former, DEF FNs
  533.           cannot use SHARED to get around this. In other words, if
  534.           the function needs to use a particular value, you must
  535.           pass it to the function via the parameter list. If a 
  536.           variable is defined in the expression (just by being used)
  537.           its value will be local to the function (and unknown).
  538.         - The function may only be invoked as part of an expression,
  539.           eg: 
  540.  
  541.             DEF SEC(x)=1/COS(x)
  542.             PRINT SEC(12)
  543.  
  544.           defines and invokes the secant function which can then be
  545.           used in the same way as other built-in functions (eg: COS).
  546.         
  547.         - Note from the above that the "FN" prefix is optional
  548.           in ACE. If used, there must be no spaces between "FN"
  549.           and the function name.  
  550.         - The fact that subprograms (SUBs) in ACE have return
  551.           values and so can be treated as functions obviates the
  552.           need for DEF FN to some extent, but the shorter definition
  553.           may be considered better in some cases. Contrast the
  554.           above definition with the following:
  555.  
  556.             SUB SEC(x)
  557.               SEC=1/COS(x)
  558.             END SUB 
  559.  
  560.         - A slightly different example is:
  561.  
  562.             DEF ADDRESS chipmem(bytes&) = ALLOC(bytes&,0)
  563.  
  564.           which when invoked would return the start address of 
  565.           a block of CHIP memory.
  566.         - Once a function has been defined, you cannot redefine
  567.           it (AmigaBASIC allows this) in the same program.
  568.         - If the optional EXTERNAL keyword is used, the function
  569.            will be externally visible to other modules. See ace.doc
  570.           section "Creating & using ACE subprogram modules".
  571.         - See the file ACEinclude:MathFunc.h for examples of
  572.           defined functions (taken from Appendix E of the
  573.           AmigaBASIC Manual). 
  574.  
  575. --------------------------------------------------------------------------------
  576. DEFxxx        - syntax: DEFxxx <letter> | _ [-<letter> | _] [, ..]
  577.  
  578.         - The DEFxxx commands (DEFINT,DEFLNG,DEFSNG,DEFDBL,DEFSTR) 
  579.           are global data type directives which affect data objects 
  580.           in both the main program and subprograms.
  581.         - For example:
  582.  
  583.             DEFLNG    a-z,_
  584.   
  585.           declares all data objects to be of type LONGINT unless 
  586.           overridden by another DEFxxx directive, variable declaration 
  587.           or trailing character (%&!#$).
  588.          - DEFDBL currently defaults to single-precision since 
  589.           double-precision floating-point is not yet supported by ACE.
  590.   
  591. --------------------------------------------------------------------------------
  592. DIM        - syntax: 
  593.           DIM [<type>]<name>(<i>[,..]) [SIZE <n>] [ADDRESS <addr>][,..]
  594.  
  595.           where <type> may be one of the following:
  596.  
  597.             ADDRESS,LONGINT,SHORTINT,SINGLE,STRING 
  598.  
  599.         - ACE requires that _all_ arrays be dimensioned before use.
  600.         - For a subscript range of 0..n, you must DIMension
  601.           an array with an index of n.
  602.         - Up to 255 dimensions can be specified with up to
  603.           32767 elements per dimension. On a 3 Mb machine, around
  604.           11 dimensions is the practical limit.
  605.         - Each dimension must be specified as a short integer constant 
  606.           (literal or defined). 
  607.         - The SIZE option is for the specification of string element
  608.           length other than the default MAXSTRINGLEN value.
  609.         - The ADDRESS option allows you to specify some arbitrarily 
  610.           allocated area of memory for the array space.
  611.         - Both options (SIZE and ADDRESS) may be used together in
  612.           DIM. This is not so for simple (string) variables where
  613.           only one or the other may be used (see STRING command).
  614.           When used in DIM, the SIZE option specifies how big each
  615.           string element is to be.
  616.         - SHARED is not an option and ACE arrays are shared in the
  617.           same way as variables. See "Subprograms" in ace.doc.
  618.         - Arrays may be dynamically allocated in ACE, eg:
  619.  
  620.             CONST STRSIZE=80 
  621.             myStrArrayAddr& = ALLOC(numlines*STRSIZE) 
  622.             IF myStrArrayAddr& = 0& THEN STOP 
  623.             DIM wds$(1) SIZE STRSIZE ADDRESS myStrArrayAddr& 
  624.  
  625.           This will allocate space for an array of numlines strings, 
  626.           each 80 bytes in length. A single array element is 
  627.           specified just to keep ACE happy, but since there is no
  628.           array range checking, and the ADDRESS option has been
  629.           used, the number of elements in the array is in reality
  630.           numlines (a variable containing say, the number of lines
  631.           in a file). 
  632.  
  633.           Note that this means that you will be able to access
  634.           elements from 0..numlines-1. If you want 0..numlines
  635.           - or even 1..numlines - then the ALLOC line must read:
  636.  
  637.             myStrArrayAddr& = ALLOC((numlines+1)*STRSIZE) 
  638.     
  639.           Here's a more complex example, showing how to
  640.           dynamically allocate space for a 2D array:
  641.  
  642.             rangeArray& = ALLOC((N+1) * (SIZEOF(SHORTINT)*(3+1)))
  643.             IF rangeArray& = 0 THEN STOP
  644.             DIM range%(1,3) ADDRESS rangeArray&
  645.  
  646.           The first index is just to keep ACE happy. Space is 
  647.           allocated via ALLOC and the really critical thing here 
  648.           is the "3" indicating how many columns in the table (as 
  649.           it were)  - 0 to 3 - to ensure correct array element 
  650.           calculations. 
  651.  
  652.           Since ACE does no run-time array bounds checking, you can 
  653.           specify range%(N,M) where N>=0 and M>=0 and M<=3. The zeroth
  654.           index is the reason why we need the +1 in two places in the 
  655.           above ALLOC call.
  656.  
  657.           See also ACEinclude:array_size.h for a subprogram which
  658.           returns the correct size to be passed to ALLOC for 2D and 3D
  659.           arrays, thus making such calculations unnecessary.
  660.  
  661. --------------------------------------------------------------------------------
  662. EOF        - syntax: EOF(n)
  663.           where n is the filenumber of an open file.
  664.         - EOF is a function which returns either -1 or 0 depending
  665.           upon whether the file pointer has reached the end-of-file
  666.           or not. 
  667.         - If the file doesn't exist or hasn't been opened, EOF 
  668.           returns -1. 
  669.          - See also ERR.
  670.  
  671. --------------------------------------------------------------------------------
  672. END        - Closes standard libraries, performs other cleanup operations
  673.           and passes control back to parent process (CLI/Shell or Wb).
  674.         - Don't use END within an IF..THEN..END IF block. Use STOP
  675.           instead which is functionally equivalent in ACE.
  676.  
  677. --------------------------------------------------------------------------------
  678. ERR        - syntax: ERR
  679.         - This parameterless function returns the error code 
  680.           corresponding to a failed operation (or zero if no
  681.           error has occurred) and then *immediately* clears the 
  682.           error code (sets it to zero).
  683.         - It is important to realise that the error code is
  684.           cleared before the function returns its value, since 
  685.           unless this value is stored, it will be lost.
  686.         - The most typical usage is as part of a conditional test, 
  687.           eg: IF ERR<>0 THEN PRINT "Error!":STOP
  688.         - ERR may also be called after an error has been trapped
  689.           by the ON ERROR event trapping mechanism. See ace.doc
  690.           for more details about event trapping in ACE. 
  691.         - Here are the current codes:
  692.  
  693.              -- AmigaBASIC codes --
  694.             52  - Bad File Number
  695.             54  - Bad File Mode
  696.             63  - Bad Record Number
  697.     
  698.             -- AmigaDOS codes --
  699.             103 
  700.             to
  701.             233 - See The AmigaDOS Manual (Bantam), 
  702.                   Error Codes and Messages.
  703.  
  704.             -- ACE codes --
  705.             300 - Error opening serial port
  706.             301 - Error closing serial port
  707.             302 - Error reading from/querying serial port
  708.             303 - Error writing to serial port
  709.             304 - Bad channel number/serial port not open
  710.  
  711.             400 - Error opening message channel
  712.             401 - Error closing message channel
  713.             402 - Error reading message channel
  714.             403 - Error writing to message channel
  715.             404 - Error waiting on message channel
  716.             405 - Bad message channel
  717.  
  718.             500 - Error opening IFF file
  719.             501 - Error closing IFF file
  720.             502 - Error reading IFF file
  721.             503 - Bad IFF channel     
  722.        
  723.             600 - Error opening screen
  724.     
  725.             700 - Error opening window
  726.  
  727. --------------------------------------------------------------------------------
  728. ERROR        - syntax: ERROR ON|OFF|STOP 
  729.         - These commands are used for enabling, disabling and 
  730.           suspending ON ERROR event trapping.
  731.         - See the Event Trapping section in ace.doc.
  732.         
  733. --------------------------------------------------------------------------------
  734. EQV        - Boolean operator: X EQV Y.
  735.  
  736.             X Y    Out
  737.             -----------
  738.             T T    T
  739.             T F    F
  740.             F T    F
  741.             F F    T            
  742.                         
  743. --------------------------------------------------------------------------------
  744. EXIT FOR *    - This command allows for the premature, conditional
  745.           termination of a FOR..NEXT loop.
  746.         - Since ACE uses the stack for FOR..NEXT loop counter & step
  747.           values, issuing a RETURN inside a FOR loop is dangerous
  748.           because the top item on the stack is something other
  749.           than the expected return address.
  750.         - In short, leaving a FOR loop before it has finished and 
  751.           never returning (CALL and GOSUB..RETURN are okay since they 
  752.           will return to the loop) is unsafe in ACE, which is why EXIT
  753.           FOR has been provided because it properly cleans up the 
  754.           stack before prematurely exiting the loop.
  755.         - When nesting one FOR loop inside another, be aware that
  756.           the inner FOR loop's EXIT FOR will override any previous 
  757.           EXIT FOR directives in the enclosing outer FOR loop.
  758.           As a consequence of this:
  759.  
  760.             FOR I=1 TO 10
  761.                 PRINT I
  762.               FOR J=1 TO 5
  763.                 PRINT J
  764.                 IF MOUSE(0) THEN EXIT FOR
  765.               NEXT
  766.               IF MOUSE(0) THEN EXIT FOR
  767.             NEXT
  768.  
  769.           will have the desired effect, whereas:
  770.  
  771.             FOR I=1 TO 10
  772.                 PRINT I
  773.               IF MOUSE(0) THEN EXIT FOR  '..overridden below!
  774.               FOR J=1 TO 5
  775.                 PRINT J
  776.                 IF MOUSE(0) THEN EXIT FOR
  777.               NEXT
  778.             NEXT
  779.  
  780.           will not. Observe the effect of running these two
  781.           code fragments in order to see what's going on here.
  782.  
  783. --------------------------------------------------------------------------------
  784. EXIT SUB    - This command can only be used inside a subprogram and
  785.           when encountered, has the effect of passing control back
  786.           to the caller of the subprogram in which it appears.
  787.         - If the current instantiation of the subprogram is the
  788.           result of a recursive call, control will be returned
  789.           to the previous instantiation of the same subprogram.
  790.  
  791. --------------------------------------------------------------------------------
  792. EXP        - syntax: EXP(n)
  793.         - Returns e to the power n, where e is the base of
  794.           natural logarithms or 2.7182818284590.
  795.  
  796. --------------------------------------------------------------------------------
  797. EXTERNAL *    - syntax: EXTERNAL [FUNCTION] [<type>] <identifier>[%&!$]
  798.         - Used to declare an external function or variable.
  799.         - To declare the data type of an external object, either
  800.           qualifier characters or one of the following type keywords
  801.           may be used:
  802.  
  803.             ADDRESS,LONGINT,SHORTINT,SINGLE,STRING
  804.  
  805.         - See the section on External References in ace.doc.
  806.         - See also the DECLARE command for an alternative
  807.           (and better) external function declaration syntax.
  808.  
  809. --------------------------------------------------------------------------------
  810. FILEBOX$ *    - syntax: FILEBOX$(title-string[,default-directory])
  811.         - This function invokes a file requester and returns
  812.           the user's selection as a fully qualified path.
  813.         - The title-string is displayed in the title bar of
  814.           the file requester (eg: "Open", "Select a file").
  815.         - If the (optional) default-directory is specified,
  816.           the file requester's initial "view" will be in that 
  817.           directory.
  818.         - If the program is running under Wb 2.04 or higher,
  819.           an ASL file requester appears. If not, an Arp 
  820.           requester is invoked which means that if you are
  821.           running Wb 1.3 or lower, you'll need arp.library
  822.           in your LIBS: directory.
  823.         - If you are using FileBox$ under Wb 1.3 make sure
  824.           you have a stack (in the shell/CLI or Tool) which
  825.           is at least 5000 bytes in size.
  826.           
  827. --------------------------------------------------------------------------------
  828. FILES        - syntax: FILES [TO <storefile>] [,<target>]
  829.         - Gives an unsorted directory listing ala AmigaBASIC
  830.           except that ACE's version takes two optional arguments
  831.           while AmigaBASIC's takes one (<target>).
  832.         - If <storefile> is specified, the listing will be
  833.              captured by that file.
  834.            - If <storefile> is omitted, it is assumed that the
  835.           program containing the FILES command was invoked 
  836.           from a shell or CLI (since the listing will be 
  837.           displayed). 
  838.            - The <target> argument can be a file, directory or
  839.              AmigaDOS device name which is to be the subject
  840.           of the directory listing.
  841.  
  842. --------------------------------------------------------------------------------
  843. FIX        - syntax: FIX(n)
  844.         - The function returns the truncated integer portion of n.
  845.         - FIX(n) is equivalent to SGN(n)*INT(ABS(n)).
  846.         - Whereas INT(n) rounds off a negative number
  847.           to the next lowest whole number, FIX does not.
  848.  
  849.         or
  850.  
  851.         - syntax: FIX n
  852.         - The command which is found only in ACE is intended to have
  853.           a similar effect to the FIX button found on some calculators
  854.           that is, to change the number of decimal places ACE rounds a
  855.           single-precision number to.
  856.         - FIX utilises the ami.lib function arnd(). When the value of
  857.           n is anything other than 8, arnd() is invoked. This affects
  858.           the commands: PRINT, PRINTS, WRITE#, PRINT# and STR$. 
  859.         - FIX should be considered experimental since I have not 
  860.           completely figured out what all the values of n (as used 
  861.           directly by arnd()) do yet.
  862.         - In a future release, a given value for n may have different 
  863.           results than it does now. Currently, n may be positive or 
  864.           negative.
  865.         
  866.             Examples
  867.             --------
  868.  
  869.             FIX -3
  870.             PRINT 12.3456
  871.  
  872.             would display: 12.35
  873.  
  874.         - PRINT USING will obviate the need for this command in
  875.           a future release in any case.
  876.  
  877. --------------------------------------------------------------------------------
  878. FONT *        - syntax: FONT <name>,<size>
  879.         - Changes the font for the current output window. 
  880.         - <font> is a string such as "opal" or "opal.font"
  881.           and <size> is an integer point size.
  882.         - Currently only works for windows created with the
  883.           WINDOW command, not for shells.
  884.         - It is best to follow a FONT statement with a LOCATE command
  885.           to "notify" the window of the font change (eg. LOCATE 1,1).
  886.           This ensures correct line-feed height for future PRINT statements.
  887.         - See also the STYLE command (which works in ALL windows).
  888.  
  889. --------------------------------------------------------------------------------
  890. FOR..NEXT    - syntax: FOR <variable>=x TO y [STEP z]
  891.         - The statements between FOR and NEXT are iterated
  892.           the number of times it takes for <variable> to become
  893.           equal to or greater than y (or less than y if z is negative)
  894.           starting from x. The loop index <variable> is incremented 
  895.           by z, or 1 if STEP is not specified. 
  896.            - NEXT can only be followed by a variable, colon or
  897.           comment and must appear on a separate line or in a 
  898.           multi-statement (not after THEN for example). 
  899.         - Any attempt to use a shared variable as a FOR loop index
  900.           will result in an (intentional) compilation error.
  901.          - If you want to branch out of a FOR loop never to return,
  902.           use EXIT FOR. See also the further discussion of this
  903.           issue (including RETURNing from within a FOR loop) in the
  904.           "Limitations" section of ace.doc.
  905.         
  906. --------------------------------------------------------------------------------
  907. FORWARD *    - syntax: FORWARD n
  908.         - Move the turtle forward n steps.
  909.  
  910. --------------------------------------------------------------------------------
  911. FRE        - syntax: FRE(n)
  912.           where n is -1,0,1,2 or 3.
  913.         - Since ACE's run-time environment is different to
  914.           AmigaBASIC's, FRE returns different values and 
  915.           takes different arguments than in AmigaBASIC.
  916.         - FRE returns the amount of free system memory according 
  917.           to n:
  918.  
  919.             n = -1    ->  total CHIP + FAST memory free.
  920.             n =  0  ->  total CHIP memory free.
  921.             n =  1  ->  total FAST memory free.
  922.             n =  2  ->  largest contiguous CHIP memory available.
  923.             n =  3  ->  largest contiguous FAST memory available.
  924.  
  925. --------------------------------------------------------------------------------
  926. GADGET *    - syntax: GADGET id,status[,gadval,rectangle,type[,style]
  927.                              [,font,size,textstyle]]
  928.  
  929.           where id is a unique gadget ID from 1 to 255 and status
  930.           is 1 or 0 to enable or disable the gadget, respectively.
  931.            The keywords ON and OFF can be used instead of 1 and 0.
  932.  
  933.         - The remainder of the parameters are optional, but gadval,
  934.           rectangle and type must be specified when creating a new 
  935.           gadget.
  936.  
  937.         - The first of these, gadval, is either a string or long
  938.           integer (see below); rectangle defines the border of
  939.           the gadget as (x1,y1)-(x2,y2).
  940.  
  941.         - The GADGET command creates a new gadget or alters the
  942.           status of an existing gadget according to the above
  943.           and in accordance with the final two parameters: type 
  944.           and style, as follows (gadval meaning is also shown):
  945.  
  946.         - Type may either be a numeric value from 1 to 5 or one
  947.           of the following keywords: BUTTON, STRING, LONGINT,
  948.           POTX or POTY, correspondingly.
  949.  
  950.           Type    Gadget       Style    Effect             GadVal
  951.           ----    ------      -----    ------             ------
  952.           1    Boolean   1    All points inside the     Gadget text
  953.                       gadget are complemented
  954.                     when it is clicked (this
  955.                     is the default).        
  956.                  
  957.                   2     A box is drawn around     Gadget text
  958.                     the gadget when clicked.
  959.  
  960.                   3    Borderless.         Gadget text
  961.  
  962.  
  963.           2    String      1    Center justifies text.     Default text
  964.                 
  965.                   2    Right justifies text.
  966.                 
  967.                   (The default is left justification).
  968.  
  969.  
  970.           3    LongInt      1    Center justifies number. Default number
  971.                                  (as string)
  972.                   2    Right justifies number.
  973.  
  974.                   (The default is left justification).
  975.  
  976.  
  977.           4    Horiz.
  978.             Slider      1    Borderless.         Maximum
  979.                                  slider value
  980.                                   (0..gadval)
  981.  
  982.           5    Vertical
  983.             Slider      1    Borderless.         Maximum
  984.                                   slider value
  985.                                  (0..gadval) 
  986.  
  987.         - Note that the final three parameters: font, size and 
  988.           textstyle are only meaningful in the context of BUTTON
  989.           gadgets. They are otherwise ignored.
  990.  
  991.     OR
  992.  
  993.         - syntax: GADGET(n)
  994.  
  995.           where n is a number from 0 to 3.
  996.  
  997.         - The GADGET function returns information about the
  998.           last gadget event according to the following:
  999.  
  1000.           N    Returns
  1001.           -    -------
  1002.           0    -1 if a gadget event has occurred since the last
  1003.             call to GADGET(0), 0 otherwise.
  1004.         
  1005.           1    The number of the last gadget selected. If the
  1006.             window's close gadget was clicked after:
  1007.  
  1008.                 GADGET WAIT 0 
  1009.  
  1010.             256 will be returned. This is not the case for event 
  1011.             trapping of gadgets, where ON WINDOW should be used 
  1012.             instead.
  1013.  
  1014.           2    Returns the address of the string from the most 
  1015.             recently selected string gadget or the long integer
  1016.             value from the most recently selected LongInt gadget.
  1017.             In the former case, use ACE's CSTR function to convert
  1018.             the address into an ACE string.
  1019.  
  1020.           3    Returns the slider position of the most recently
  1021.             selected (horizontal or vertical) proportional gadget.
  1022.  
  1023.           4    Returns the address of the Intuition gadget structure 
  1024.             of the last gadget selected.
  1025.  
  1026.         - See also GADGET OUTPUT.
  1027.         
  1028. --------------------------------------------------------------------------------
  1029. GADGET CLOSE *    - syntax: GADGET CLOSE id
  1030.         - This command removes the specified gadget from the
  1031.           current output window and should always be called
  1032.           when you are finished with a gadget.
  1033.         - Make sure that the window belonging to the gadget 
  1034.           you wish to close is the current output window 
  1035.           (see WINDOW OUTPUT command below).
  1036.  
  1037. --------------------------------------------------------------------------------
  1038. GADGET MOD *    - syntax: GADGET MOD id,knob-position[,max-positions]
  1039.         - This command modifies the specified proportional
  1040.           gadget.
  1041.         - The new knob position (within the gadget's body) must 
  1042.           be specified.
  1043.         - The optional max-positions parameter if specified changes
  1044.           the number of discrete positions in which the knob may be
  1045.           found. A significant change from the previous value given
  1046.           (eg. see the gadval parameter in the GADGET command) may
  1047.           result in a change to the knob size.
  1048.         
  1049. --------------------------------------------------------------------------------
  1050. GADGET ON .. *    - syntax: GADGET ON|OFF|STOP 
  1051.         - These commands are used for enabling, disabling and 
  1052.           suspending ON GADGET event trapping.
  1053.         - See the Event Trapping section in ace.doc.
  1054.         
  1055. --------------------------------------------------------------------------------
  1056. GADGET OUTPUT *    - syntax: GADGET OUTPUT id
  1057.         - Sets the current gadget so that information may be obtained 
  1058.           about a gadget via the GADGET(n) function at times other 
  1059.           than when a gadget event occurs. This only makes sense in 
  1060.           conjunction with string, longint and slider gadgets.
  1061.         - In the case of string and longint gadgets, GADGET(2) may
  1062.           be used to obtain the current string or long integer value
  1063.           held by the gadget.
  1064.         - In the case of slider gadgets (POTX/POTY), GADGET(3) will
  1065.           return the current knob position.
  1066.         
  1067. --------------------------------------------------------------------------------
  1068. GADGET WAIT *    - syntax: GADGET WAIT id
  1069.         - This command puts the program to sleep until it receives
  1070.           a message that the specified gadget has been selected.
  1071.         - If id=0 the program will wake up when ANY gadget is 
  1072.           selected. A call to GADGET(1) can then be used to 
  1073.           determine the number of the gadget.
  1074.  
  1075. --------------------------------------------------------------------------------
  1076. GET        - syntax: GET [#]<fileNum>,<structVar>[,<recordNum>]
  1077.         - Retrieves the next or specified record from a random file
  1078.           corresponding to <fileNum>, and stores it in the supplied
  1079.           structure variable.
  1080.         - The record number (<recordNum>) is optional. The minimum 
  1081.           <recordNum> is 1, while the maximum value depends upon 
  1082.           available disk space and structure size. 
  1083.         - See also the ace.doc section, "Random Files".
  1084.  
  1085. --------------------------------------------------------------------------------
  1086. GLOBAL *    - syntax: GLOBAL [<type>] <identifier>[%&!$]
  1087.           where the optional <type> parameter is one of:
  1088.  
  1089.             ADDRESS,LONGINT,SHORTINT,SINGLE,STRING
  1090.  
  1091.         - A static variable (BSS object) is declared. The scope
  1092.           of the variable is limited to the current source module
  1093.           from the point of the declaration onward.
  1094.         - See also "Common and Global variables" in ace.doc.    
  1095.          
  1096. --------------------------------------------------------------------------------
  1097. GOSUB..RETURN    - syntax: GOSUB <label> | <line>
  1098.         - GOSUB transfers control to the specified label or line.
  1099.         - RETURN passes control back to the statement following the
  1100.           most recent GOSUB command.
  1101.         - Issuing a RETURN without a matching GOSUB will generally
  1102.           invoke the GURU.
  1103.  
  1104. --------------------------------------------------------------------------------
  1105. GOTO        - syntax: GOTO <label> | <line>
  1106.         - Transfers control to the specified label or line.
  1107.  
  1108. --------------------------------------------------------------------------------
  1109. HANDLE *    - syntax: HANDLE(n)
  1110.           where n is the file number of an OPENed file (1..255).
  1111.         - This function returns a long integer which is a pointer to
  1112.           a dos file handle suitable for use with dos.library functions
  1113.           such as Read (xRead when declared in ACE/AmigaBASIC). 
  1114.         - If HANDLE returns 0 the file does not exist or can't be
  1115.           opened as requested.
  1116.  
  1117. --------------------------------------------------------------------------------
  1118. HEADING *    - Returns the turtle's current heading in degrees (0..359).
  1119.  
  1120. --------------------------------------------------------------------------------
  1121. HEX$        - syntax: HEX$(n)
  1122.         - Returns a string which represents the hexadecimal value
  1123.           of the decimal argument n.
  1124.  
  1125. --------------------------------------------------------------------------------
  1126. HOME *        - Move the turtle to its home position.
  1127.  
  1128. --------------------------------------------------------------------------------
  1129. IF        - syntax: IF..THEN..[ELSE..]
  1130.               IF..GOTO..[ELSE..]
  1131.               IF..THEN
  1132.               .
  1133.               [ELSE]
  1134.               .
  1135.               END IF         
  1136.         - ELSEIF is not yet implemented.
  1137.         - IF..[ELSE]..END IF blocks can be nested.
  1138.         - Use STOP rather than END before an END IF
  1139.           otherwise the compiler will become confused.
  1140.         - There must be _something_ between IF..THEN
  1141.           and END IF, even if only a blank line or comment,
  1142.           eg.
  1143.                 IF x=2 THEN
  1144.                   '..do something or maybe nothing
  1145.                 END IF        
  1146.  
  1147. --------------------------------------------------------------------------------
  1148. IFF *        - syntax: IFF(channel,n)
  1149.         - This function returns information about the IFF graphics
  1150.           file associated with the specified channel.
  1151.         - The channel parameter must be in the range 1..255.
  1152.         - The values returned are dictated by N thus:
  1153.  
  1154.           N    Return value
  1155.           -     ------------
  1156.           0    Address of name of IFF picture form (eg: ILBM). 
  1157.             Use ACE's CSTR function to retrieve the string.        
  1158.           1    Width of picture.
  1159.           2    Height of picture.
  1160.           3    Depth of picture.
  1161.           4    Screen Mode to use in SCREEN command. Note: if
  1162.             IFF(channel,3) returns a depth of 6, HAM mode
  1163.             is currently assumed even though it might be
  1164.             extra-halfbrite. If the picture doesn't render
  1165.             correctly, use screen-mode 6 rather than 5 (see
  1166.             SCREEN command). Alternatively, don't specify 
  1167.             the screen-id when using the IFF READ command.
  1168.             This issue may be resolved in a future revision.
  1169.  
  1170.         - Information returned by values to this function when
  1171.           N is in the range 1..4 can be used directly in a SCREEN
  1172.           command.
  1173.         - See also IFF OPEN, IFF READ and ERR.
  1174.         
  1175. --------------------------------------------------------------------------------
  1176. IFF CLOSE *    - syntax: IFF CLOSE [#]channel
  1177.         - Closes the specified IFF channel.
  1178.         - If a screen was opened by IFF READ, IFF CLOSE will
  1179.           close this.    
  1180.         - See also ERR.
  1181.  
  1182. --------------------------------------------------------------------------------
  1183. IFF OPEN *    - syntax: IFF OPEN [#]channel,file-name
  1184.         - This command associates an IFF picture file with the
  1185.           specified channel.
  1186.         - All subsequent IFF command/function calls use this
  1187.           channel number.
  1188.         - The IFF OPEN command also stores important information
  1189.           about the picture file for IFF READ and IFF(channel,n).
  1190.         - See also ERR.
  1191.  
  1192. --------------------------------------------------------------------------------
  1193. IFF READ *    - syntax: IFF READ [#]channel[,screen-id]
  1194.         - This command loads the IFF picture from the file 
  1195.           associated with the specified channel.
  1196.         - The screen-id is optional. If not supplied, a non-ACE
  1197.           screen and window will be used to display the picture,
  1198.           which is closed later by a call to IFF CLOSE.
  1199.         - Otherwise, the screen should be opened in accordance with 
  1200.           the information returned via the IFF function (see above).
  1201.         - See also ERR and ace.doc.
  1202.         
  1203. --------------------------------------------------------------------------------
  1204. IMP        - Boolean operator: X IMP Y.
  1205.  
  1206.             X Y    Out
  1207.             -----------
  1208.             T T    T
  1209.             T F     F
  1210.             F T    T
  1211.             F F    T        
  1212.  
  1213. --------------------------------------------------------------------------------
  1214. INKEY$        - syntax: INKEY$
  1215.         - Returns a single character string when a keystroke 
  1216.           is pending, otherwise the NULL string is returned.
  1217.         - INKEY$ works fine in user-defined windows, but since
  1218.           a normal CON: window intercepts all keystrokes, INKEY$
  1219.           is not very useful in a shell/CLI.
  1220.  
  1221. --------------------------------------------------------------------------------
  1222. INPUTBOX *    - syntax: INPUTBOX(prompt[,title][,default][,xpos][,ypos])
  1223.         - This function returns a long integer value after invoking
  1224.           a requester which prompts the user to enter a value. If
  1225.           you need to get a single-precision value, apply VAL to
  1226.           the result of the INPUTBOX$ function (see next entry).
  1227.         - An OK and Cancel gadget allow the user to accept or reject
  1228.           the entered value. Zero is returned if the Cancel gadget
  1229.           is selected.
  1230.         - The prompt string must be specified but all other
  1231.           parameters are optional: title goes into the requester's
  1232.           title bar; default is a string containing a default
  1233.           integer value which becomes the return value if nothing
  1234.           is entered; xpos and ypos specify where to place the
  1235.           requester on the screen.
  1236.         - Example: num& = INPUTBOX("Enter a number:",,"12345")
  1237.  
  1238. --------------------------------------------------------------------------------
  1239. INPUTBOX$ *    - syntax: INPUTBOX$(prompt[,title][,default][,xpos][,ypos])
  1240.         - This function returns a string value after invoking
  1241.           a requester which prompts the user to enter a value.
  1242.         - An OK and Cancel gadget allow the user to accept or reject
  1243.           the entered string. If Cancel is selected the NULL string
  1244.           is returned. 
  1245.         - The prompt string must be specified but all other
  1246.           parameters are optional: title goes into the requester's
  1247.           title bar; default is a string return value to be used if
  1248.           no new value is entered; xpos and ypos specify where to 
  1249.           place the requester on the screen.
  1250.         - Example: command$ = INPUTBOX$("Enter a command:")
  1251.  
  1252. --------------------------------------------------------------------------------
  1253. INPUT        - syntax: INPUT [<prompt-string>] [;|,] var1 [[;|,] varN..]
  1254.         - Strings, integers and fixed-point or exponential format 
  1255.           single-precision values can be input from the keyboard.
  1256.         - Each value must appear on a separate line even when
  1257.           a single INPUT statement contains multiple variables.  
  1258.         - If a semicolon precedes a variable "? " will appear, while 
  1259.           if a comma is used no "? " will appear.
  1260.         - As of ACE v2.0 INPUT works with any screen or window mode.
  1261.  
  1262. --------------------------------------------------------------------------------
  1263. INPUT #        - syntax: INPUT #filenumber,<variable-list>
  1264.         - Reads data items from a sequential file.
  1265.         - The variables in <variable-list> must each match the type
  1266.           of item being read.
  1267.         - If unambiguous data format is required, it is best to
  1268.           use WRITE# to store the values that INPUT# will read
  1269.           since WRITE# separates each item with commas and delimits
  1270.           strings with double quotes allowing for spaces. WRITE# will
  1271.           also result in more efficient use of disk space and faster
  1272.           reading by INPUT#.
  1273.         - ACE accepts white space (line feeds, spaces, tabs), commas
  1274.           and quotes as delimiters for each field in a sequential file.
  1275.         - AmigaBASIC and ACE sequential file formats are virtually
  1276.           identical.
  1277.         - See also "Files" section in ace.doc.
  1278.          - See also ERR.
  1279.  
  1280. --------------------------------------------------------------------------------
  1281. INPUT$        - syntax: INPUT$(X,[#]filenumber)
  1282.         - Returns a string of X characters from the filenumber'th file.
  1283.         - There is a 32K upper limit for X in ACE, but if you
  1284.           want to read a whole file for example, and the file length
  1285.           (determined by the LOF function) is greater than MAXSTRINGLEN
  1286.           you should do the following:
  1287.  
  1288.             STRING myString SIZE N
  1289.             OPEN "I",#1,filename$
  1290.              myString = INPUT$(LOF(1),#1)
  1291.             CLOSE #1
  1292.  
  1293.           or if you want to allocate space at run-time according to the
  1294.           exact file size:
  1295.  
  1296.             bytes& = LOF(1) + 1    '..need "+1" for EOS marker
  1297.             addr& = ALLOC(bytes&)
  1298.             STRING myString ADDRESS addr&
  1299.             OPEN "I",#1,filename$
  1300.              myString = INPUT$(bytes&,#1)
  1301.             CLOSE #1
  1302.         
  1303.         - This method should only be used for small text files as it
  1304.           is slow, and text is really the only useful thing to put in 
  1305.           a string if you wish to manipulate it. Some string functions
  1306.           will react unexpectedly to non-text characters in strings.
  1307.         - If you wish to read a large file rapidly, it's best to use 
  1308.           the dos.library function Read (declared as xRead in BASIC).
  1309.           The sound player play.b gives an example of this.
  1310.         - In general INPUT$ is most useful for reading a few characters
  1311.           at a time from a file. If you wish to read a line at a time,
  1312.           use LINE INPUT#. Use INPUT# if you want to read numbers or
  1313.           delimited strings. 
  1314.         - INPUT$ in ACE is only used for sequential file input, so
  1315.           the filenumber is not optional. In AmigaBASIC, if the latter
  1316.           is omitted, input is taken from the keyboard. Not so in ACE.
  1317.         - See also section on files in ace.doc.
  1318.  
  1319. --------------------------------------------------------------------------------
  1320. INSTR        - syntax: INSTR([I,]X$,Y$)
  1321.         - INSTR searches for the first occurrence of Y$ in X$ and
  1322.           returns the character position from 1..N in X$.
  1323.         - If the optional offset I is specified, the search starts
  1324.           from that position, otherwise the search starts from the
  1325.           first character in X$.
  1326.         - If I is greater than len(X$) or X$="" or Y$ is not found
  1327.           in X$ or len(Y$) > len(X$), INSTR returns 0.
  1328.         - If Y$="", INSTR returns I or 1.
  1329.         - X$ and Y$ can be string expressions, variables or literals
  1330.           or any combination thereof.
  1331.  
  1332. --------------------------------------------------------------------------------
  1333. INT        - syntax: INT(n)
  1334.         - Returns the largest integer less than or equal to n.
  1335.  
  1336. --------------------------------------------------------------------------------
  1337. KILL        - syntax: KILL <filespec>
  1338.         - Deletes a file or directory.
  1339.  
  1340. --------------------------------------------------------------------------------
  1341. LEFT$        - syntax: LEFT$(X$,I)
  1342.         - Returns a string which contains the leftmost I characters
  1343.           of X$.
  1344.         - If I > len(X$), the whole string (X$) is returned.
  1345.         - If I = 0, the NULL string is returned.
  1346.  
  1347. --------------------------------------------------------------------------------
  1348. LEN        - syntax: LEN(X$)
  1349.         - Returns the number of characters in X$.
  1350.  
  1351. --------------------------------------------------------------------------------
  1352. LET        - syntax: [LET] <variable> = <expression>
  1353.         - LET assigns a value to a variable.
  1354.         - Its use is optional so that LET X=1 is equivalent
  1355.           to X=1.
  1356.  
  1357. --------------------------------------------------------------------------------
  1358. LIBRARY        - syntax: LIBRARY [CLOSE] [<libname>]
  1359.         - Opens or closes one or more Amiga shared libraries.
  1360.         - Note that <libname> may be with or without quotes
  1361.           and can either end in ".library", ".bmap" or have no
  1362.           file extension whatever in ACE.
  1363.         - For example, to open the graphics library, two legal 
  1364.           syntaxes are: 
  1365.  
  1366.             LIBRARY graphics 
  1367.           and
  1368.             LIBRARY "graphics.library"
  1369.  
  1370.         - LIBRARY CLOSE closes all open libraries or a single library
  1371.           can be specified instead.
  1372.         - See "Shared library function calls" section in ace.doc.
  1373.  
  1374. --------------------------------------------------------------------------------
  1375. LINE        - The syntax of this command - apart from the simple 
  1376.           case of LINE (x1,y1)-(x2,y2)[,color,b[f]] - is a little
  1377.           unclear from the AmigaBASIC manual.
  1378.  
  1379.         - The syntax of the LINE command in ACE is currently as 
  1380.           follows:
  1381.  
  1382.             LINE [STEP](x1,y1)[-(x2,y2)[,[color],[b[f]]]]
  1383.  
  1384.         - The second STEP directive has been omitted, but may be
  1385.           added in a future revision.
  1386.         - A statement such as LINE STEP (100,90) will cause a line
  1387.           to be drawn from the last referenced coordinate to 100,90.
  1388.           In addition, this use of LINE does *not* allow for colour
  1389.           setting as can be seen from the ACE syntax specification
  1390.           whereas LINE (100,90)-(200,150),color does. The same is
  1391.           true for the "b" and "bf" options. A future version may
  1392.           correct this problem.
  1393.         - Note: When using "b" or "bf", x2 must be >= x1 and y2 must 
  1394.           be >= y1 otherwise display weirdness will result!
  1395.  
  1396. --------------------------------------------------------------------------------
  1397. LINE INPUT #    - syntax: LINE INPUT #filenumber,<string-variable>
  1398.         - Reads a line from the filenumber'th sequential file and
  1399.           stores it in <string-variable> (simple variable or array
  1400.           element).
  1401.         - If <string-variable> does not exist, ACE creates it.
  1402.         - Lines are delimited by a line-feed character (ASCII 10)
  1403.           and the string which is returned consists of the characters
  1404.           up to but not including the line-feed.
  1405.         - Note that the AmigaBASIC manual (8-72) shows a semicolon
  1406.           instead of a comma in the above syntax which is incorrect
  1407.           since AmigaBASIC itself accepts only a comma.
  1408.         - The alternative form of LINE INPUT for keyboard input is
  1409.           not currently implemented in ACE.
  1410.         - LINE INPUT will not read more than MAXSTRINGLEN characters.
  1411.         - See also INPUT$ (which will read up to 32K of characters),
  1412.           INPUT# and ace.doc's section on files.
  1413.         - See also ERR.
  1414.  
  1415. --------------------------------------------------------------------------------
  1416. LOCATE        - syntax: LOCATE line[,column].
  1417.         - LOCATE changes the printing position for the current
  1418.           screen or window.
  1419.         - Note that the use of LOCATE on a screen or user-defined 
  1420.           window currently also changes the next graphics drawing 
  1421.           coordinates. 
  1422.  
  1423. --------------------------------------------------------------------------------
  1424. LOC        - syntax: LOC(n)
  1425.           where n is the number of an open file.
  1426.         - LOC has a simpler behaviour in ACE than in AmigaBASIC. For 
  1427.           any file/device for which it makes sense, LOC returns the 
  1428.           number of bytes read or written with respect to the start of 
  1429.           the file. Put another way, LOC returns the location of the
  1430.           internal file pointer.
  1431.         - The most common use for this function is in conjunction with
  1432.           random files. Assuming a structure of type X is being used
  1433.           as the read/write buffer for a random file with a file number
  1434.           of 1, the following code would print the number of the last 
  1435.           record (from 1..N) which had been read or written:
  1436.  
  1437.             Print Loc(1) \ SizeOf(X)
  1438.  
  1439. --------------------------------------------------------------------------------
  1440. LOF        - syntax: LOF(n) 
  1441.           where n is the number of an open file. 
  1442.         - LOF returns the length of the file in bytes. 
  1443.         - If the file is not open or is non-existent, LOF returns 0.
  1444.         - See also ERR.
  1445.  
  1446. --------------------------------------------------------------------------------
  1447. LOG        - syntax: LOG(n)
  1448.         - Returns the natural logarithm of n (log base e of n).
  1449.         - The argument n should be greater than zero.
  1450.  
  1451. --------------------------------------------------------------------------------
  1452. LONGINT    *    - syntax: LONGINT <identifier>[,..]
  1453.         - Declares and initialises (to zero) one or more long integer 
  1454.           variables.
  1455.  
  1456.     OR
  1457.  
  1458.         - syntax: LONGINT(X$)
  1459.         - This function returns the numeric value of X$ as a long
  1460.           integer number.
  1461.         - The hexadecimal and octal directives (&H and &O) may prefix
  1462.           the string in order to allow the handling of these bases.
  1463.         - LONGINT strips off leading whitespace (eg: spaces, tabs).
  1464.          - The main use for this function is to overcome the loss of 
  1465.           accuracy which results when VAL is used to extract a _large_ 
  1466.           long integer value from a string.
  1467.          - See also VAL.
  1468.  
  1469. --------------------------------------------------------------------------------
  1470. MENU        - syntax: MENU menu-id,item-id,state[,title[,command-key]]
  1471.         - This command creates or modifies the state of a menu or 
  1472.           menu item as per AmigaBASIC.
  1473.         - The final optional parameter is peculiar to ACE and if
  1474.           used, specifies the Amiga-<key> sequence which if issued
  1475.           results in the selection of the corresponding menu option. 
  1476.           The command key option is displayed along with the menu
  1477.           item when the menu is rendered.
  1478.         - The state parameter can have the following values:
  1479.  
  1480.             State        Effect
  1481.             -----        ------
  1482.         
  1483.             0        Menu or item is disabled (shadowed).
  1484.     
  1485.             1        Menu or item is enabled.        
  1486.  
  1487.             2        Menu item is checkmarked.
  1488.                     There must be at least 2 spaces
  1489.                     preceding the item for the tick
  1490.                     to be rendered properly.
  1491.  
  1492.         - The most advisable method of creating menus is to start
  1493.           from the first menu and first item in each menu, and code 
  1494.           them in sequence thereafter.
  1495.  
  1496.     OR
  1497.  
  1498.         - syntax: MENU(n)
  1499.         - This function returns information about the most recently
  1500.           selected menu and item. If n=0 the number of the menu is
  1501.           returned. If n=1 the number of the menu item is returned.
  1502.           If n=2 the number of the menu subitem is returned.
  1503.         - MENU(0) returns 0 between menu events after being called
  1504.           once for a particular menu selection.
  1505.         - MENU(2) exists to support GadTools menus, and intrinsic
  1506.           ACE menus do not permit the creation of subitems. If MENU(0)
  1507.           and MENU(1) do not correspond to a menu item with subitems,
  1508.           MENU(2)'s value should be considered garbage.
  1509.         - This function must be used in conjunction with MENU event
  1510.           trapping or WAITing.
  1511.  
  1512. --------------------------------------------------------------------------------
  1513. MENU CLEAR *    - syntax: MENU CLEAR
  1514.         - This command is the equivalent of MENU RESET in AmigaBASIC.
  1515.         - The result of calling this is to clear the menu strip for 
  1516.           the current output window. In AmigaBASIC the initial menu
  1517.           for the interpreter's window is restored if a new menu is
  1518.           set up in that window. This does not apply in ACE.
  1519.         - WINDOW CLOSE performs a menu clear in case you don't.
  1520.  
  1521. --------------------------------------------------------------------------------
  1522. MENU ON ..    - syntax: MENU ON|OFF|STOP 
  1523.         - These commands are used for enabling, disabling and 
  1524.           suspending ON MENU event trapping.
  1525.         - See the Event Trapping section in ace.doc.
  1526.         
  1527. --------------------------------------------------------------------------------
  1528. MENU WAIT *    - syntax: MENU WAIT
  1529.         - This command puts the program to sleep until menu activity
  1530.           is detected.
  1531.             
  1532. --------------------------------------------------------------------------------
  1533. MESSAGE CLEAR *    - syntax: MESSAGE CLEAR [#]channel
  1534.         - Clears the message port associated with the specified
  1535.           channel. 
  1536.         - See also ERR.
  1537.  
  1538. --------------------------------------------------------------------------------
  1539. MESSAGE CLOSE *    - syntax: MESSAGE CLOSE [#]channel
  1540.         - Closes the specified message channel.
  1541.         - See also ERR.
  1542.  
  1543. --------------------------------------------------------------------------------
  1544. MESSAGE OPEN *    - syntax: MESSAGE OPEN [#]channel,port-name,mode
  1545.         - Creates a message channel for reading (mode="R") 
  1546.           or writing (mode="W").
  1547.         - If the channel is for writing, the port-name is
  1548.           the name of a message port which is assumed to
  1549.           exist. If it does not exist an error will result 
  1550.           (see ERR).
  1551.           You can therefore poll a remote port to determine
  1552.           when it has been created.
  1553.         - See also ERR.
  1554.  
  1555. --------------------------------------------------------------------------------
  1556. MESSAGE READ *    - syntax: MESSAGE READ [#]channel,buffer
  1557.         - Reads a message into buffer from the specified message 
  1558.           channel.
  1559.         - See also ERR.
  1560.  
  1561. --------------------------------------------------------------------------------
  1562. MESSAGE WAIT *    - syntax: MESSAGE WAIT [#]channel
  1563.         - Waits for a message to appear on the specified channel.
  1564.         - Please note that if no message is forthcoming, this
  1565.           command will wait forever.
  1566.         - Waiting on a port opened for writing (mode = "W") has the 
  1567.           effect of waiting for the remote task to signal that it has 
  1568.           accepted a message written to its port. This allows for 
  1569.           synchronisation between processes, ie. A writes to B, B 
  1570.           accepts message from A, A continues processing.
  1571.         - See also ERR.
  1572.  
  1573. --------------------------------------------------------------------------------
  1574. MESSAGE WRITE *    - syntax: MESSAGE WRITE [#]channel,buffer
  1575.         - Writes a message to the specified message channel from
  1576.           the buffer.
  1577.         - See also ERR.
  1578.  
  1579. --------------------------------------------------------------------------------
  1580. MID$        - syntax: MID$(X$,I[,J])
  1581.         - Only the MID$ _function_ is currently implemented in ACE.
  1582.         - Returns a string containing J characters from X$ starting 
  1583.           from the Ith character.
  1584.         - If J is omitted or there are fewer than J characters 
  1585.           to the right of (and including) the Ith character, all 
  1586.           characters from the Ith position to the end of the string 
  1587.           are returned.
  1588.         - If I > len(X$), MID$ returns the NULL string.
  1589.   
  1590. --------------------------------------------------------------------------------
  1591. MOD        - Modulo arithmetic operator: X MOD Y.
  1592.  
  1593.             eg: 101 MOD 10 = 1
  1594.     
  1595. --------------------------------------------------------------------------------
  1596. MOUSE        - syntax: MOUSE(n)
  1597.         - Returns information about the current status of the mouse.
  1598.         - Values of n ranging from 0..2 are presently meaningful in ACE.
  1599.         - MOUSE(0) returns -1 or 0 to indicate whether the left 
  1600.           mouse button is currently being pressed or not.
  1601.         - MOUSE(1) returns the X location of the mouse pointer
  1602.           in the current output window or screen.
  1603.         - MOUSE(2) returns the Y location of the mouse pointer
  1604.           in the current output window or screen.
  1605.         - Future revisions of ACE will add more functionality to
  1606.           MOUSE(n).
  1607.  
  1608. --------------------------------------------------------------------------------
  1609. MOUSE ON ..    - syntax: MOUSE ON|OFF|STOP 
  1610.         - These commands are used for enabling, disabling and 
  1611.           suspending ON MOUSE event trapping.
  1612.         - See the Event Trapping section in ace.doc.
  1613.         
  1614. --------------------------------------------------------------------------------
  1615. MSGBOX *    - syntax: MSGBOX(message,button-text1[,button-text2])
  1616.         - This function invokes a system requester having one or
  1617.           two buttons (boolean gadgets) with the specified text
  1618.           in each, plus a message in the requester's main body
  1619.           as specified by the message parameter.
  1620.         - If only button-text1 is given, a single button is
  1621.           rendered, otherwise two buttons appear.
  1622.         - The function's return value is -1 or 0 depending
  1623.           upon whether the first or second button is selected by
  1624.           the user. With only one button present, the return
  1625.           value is always -1.
  1626.  
  1627.         - Example: result = MsgBox("Really Quit?","Yes","No")
  1628.     OR
  1629.         - syntax: MSGBOX message,button-text
  1630.         - This statement can be used to display a simple system
  1631.           requester. Since no value is returned via this statement,
  1632.           only a single button is permitted.
  1633.  
  1634.         - Example: MsgBox "File Deleted!","Continue"    
  1635.  
  1636.         - Note that the message may only consist of a single line
  1637.           but a future revision will allow for multiple lines.
  1638.          - Note also that under Wb 1.3 the "message" text is used
  1639.           to determine the width of the requester. Under Workbench 
  1640.           2.x/3.0, the operating system proportions the requester 
  1641.           appropriately.
  1642.  
  1643. --------------------------------------------------------------------------------
  1644. NAME        - syntax: NAME <filespec1> AS <filespec2>
  1645.         - Renames a file or directory.
  1646.     
  1647. --------------------------------------------------------------------------------
  1648. NOT        - Boolean operator: NOT X.
  1649.  
  1650.             X    Out
  1651.             -----------
  1652.             T    F
  1653.             F    T
  1654.  
  1655. --------------------------------------------------------------------------------
  1656. OCT$        - syntax: OCT$(n)
  1657.         - Returns the octal string representation of the long
  1658.           integer value n.
  1659.  
  1660. --------------------------------------------------------------------------------
  1661. ON..GOTO/GOSUB/CALL
  1662.         - syntax 1: ON <integer-expr> GOTO | GOSUB <label> | <line>
  1663.  
  1664.           eg. ON n GOSUB one,two,three,four,five
  1665.             
  1666.           such that if n=1 the program will branch to the label 
  1667.           "one" and if n=4 the branch will be to "four".
  1668.  
  1669.         - syntax 2: ON <event-spec> GOTO | GOSUB <label> | <line>
  1670.           syntax 3: ON <event-spec> CALL <SUBprogram-name>
  1671.           
  1672.         - See "Event Trapping" section in ace.doc for more details
  1673.           of the usage represented by syntax 2 and 3.
  1674.  
  1675. --------------------------------------------------------------------------------
  1676. OPEN        - syntax: OPEN mode,[#]<fileNum>,<filespec>
  1677.           which is the same as syntax 1 in AmigaBASIC
  1678.           except that no file-buffer size can be specified.
  1679.         - Mode is an upper or lower case character where:
  1680.  
  1681.             - "I" = open file for input
  1682.  
  1683.             - "O" = open file for output;
  1684.                 creates new file if <filespec>
  1685.                 doesn't exist.
  1686.  
  1687.             - "A" = open file for appending; 
  1688.                 creates new file if <filespec>
  1689.                 doesn't exist.
  1690.  
  1691.             - "R" = open for random access;
  1692.                 creates new file if <filespec>
  1693.                 doesn't exist.
  1694.         
  1695.         - <fileNum> is a value from 1..255 and <filespec> 
  1696.           is a string containing the file name (eg: "test.doc",
  1697.           "df1:letters/santa").
  1698.         - Multiple files can be open simultaneously.
  1699.         - See also ERR.
  1700.  
  1701. --------------------------------------------------------------------------------
  1702. OPTION *    - syntax: OPTION <switch>+|-[,<switch>+|-..]
  1703.         - Compiler directives (switches) can be issued via this
  1704.           command instead of from the command line. The latter
  1705.           only allows for compiler directives to be *activated*.
  1706.         - Each switch must be followed by a "+" or "-" with
  1707.           the former activating the directive and the latter
  1708.           neutralising it.
  1709.         - Switches currently implemented are: b,c,E,i,l,m,O,w
  1710.          - See ace.doc, "Compiler options" for details of each
  1711.           switch. Notice that for switches i and O, activation 
  1712.           or deactivation takes effect at the end of compilation.
  1713.  
  1714. --------------------------------------------------------------------------------
  1715. OR        - Boolean operator: X OR Y.
  1716.  
  1717.             X Y     Out
  1718.             -----------
  1719.             T T    T
  1720.             T F    T
  1721.             F T    T
  1722.             F F     F
  1723.  
  1724. --------------------------------------------------------------------------------
  1725. PAINT        - syntax: PAINT (x,y)[[,color-id][,border-id]]
  1726.         - PAINT flood-fills an enclosed region with the
  1727.           color specified by color-id and if the latter
  1728.           is omitted, the current foreground pen is used.
  1729.         - If border-id is not specified, color-id is used 
  1730.           to determine when to stop the filling process by 
  1731.           looking for a border of that color. The use of 
  1732.           border-id allows a region to be filled with one 
  1733.           color and be bordered by another.
  1734.         - x and y can be anywhere within the enclosed region.
  1735.         - Note that the ACE version of PAINT has no STEP 
  1736.           option so x and y constitute an absolute coordinate.
  1737.         - STEP may be added in a future revision.
  1738.  
  1739. --------------------------------------------------------------------------------
  1740. PALETTE        - syntax: PALETTE color-id,R,G,B
  1741.           where R,G,B are the red, green and blue color 
  1742.           components of color-id, each in the range 0..1.
  1743.         - Palette changes colors in the current screen 
  1744.           (including the Workbench!). 
  1745.  
  1746. --------------------------------------------------------------------------------
  1747. PATTERN        - syntax: PATTERN [line-pattern][,area-pattern] | RESTORE
  1748.         - Same as in AmigaBASIC with the addition of a RESTORE
  1749.           option. PATTERN RESTORE resets the line and area patterns
  1750.           to their default values.
  1751.         - The line-pattern is a short integer value.
  1752.         - The area-pattern is a DIM'd short integer array. 
  1753.         - The number of elements in area-pattern must be a power of 2.
  1754.  
  1755. --------------------------------------------------------------------------------
  1756. PEEKx        - syntax: PEEKx(<address>)
  1757.         - The functions PEEK,PEEKW and PEEKL return an 8-bit, 16-bit 
  1758.           and 32-bit value from memory, respectively.
  1759.  
  1760. --------------------------------------------------------------------------------
  1761. PENDOWN *    - Lowers the turtle's "pen". This enables drawing by the
  1762.           turtle graphics commands.
  1763.  
  1764. --------------------------------------------------------------------------------
  1765. PENUP *        - Raises the turtle's "pen". This disables drawing by the
  1766.           turtle graphics commands.
  1767.         
  1768. --------------------------------------------------------------------------------
  1769. POINT        - syntax: POINT(x,y)
  1770.         - Returns the color-id of a point in the current output
  1771.           window or screen.
  1772.  
  1773. --------------------------------------------------------------------------------
  1774. POKEx        - syntax: POKEx <address>,<numeric-value>
  1775.         - The commands POKE,POKEW and POKEL change the contents of 
  1776.           <address> to <numeric-value>.
  1777.         - The number of bits affected is 8, 16 and 32 respectively.
  1778.         - Unless you know what you are POKEing and why, don't (!!)
  1779.           or you can expect a visit from the Guru.
  1780.         
  1781. --------------------------------------------------------------------------------
  1782. POS        - Returns the print column in the current user-defined screen
  1783.           or window.
  1784.         - Note that the syntax is different from AmigaBASIC where a
  1785.           dummy argument of zero is used: POS(0).
  1786.         - POS and CSRLIN have no meaning in a CLI/shell and will
  1787.           return 0 if used when a CLI/shell is the current output
  1788.           window. 
  1789.  
  1790. --------------------------------------------------------------------------------
  1791. POTX *        - syntax: POTX(n)
  1792.           where n=0 or 1 (game port 1 or 2).
  1793.         - Returns a short integer value corresponding to the
  1794.           current potentiometer reading on pin 5 of the game port.
  1795.          - POTX(0) returns 0 currently.
  1796.  
  1797. --------------------------------------------------------------------------------
  1798. POTY *        - syntax: POTY(n)
  1799.           where n=0 or 1 (game port 1 or 2).
  1800.         - Returns a short integer value corresponding to the
  1801.           current potentiometer reading on pin 9 of the game port.
  1802.         - POTY(0) returns 0 currently. 
  1803.  
  1804. --------------------------------------------------------------------------------
  1805. PRINT        - syntax: PRINT [<expression>][,|;| ..]
  1806.           where <expression> is a string or numeric value to
  1807.           be printed at the current print location of the current
  1808.           (DOS or Intuition) output window. 
  1809.         - LOCATE can be used to set the location for the next PRINT 
  1810.           command. So can SETXY for printing in a non-shell window.
  1811.         - PRINT can be abbreviated to '?' as in AmigaBASIC.
  1812.         - If <expression> is followed by a semi-colon, a line-feed
  1813.           will not occur before the next PRINT.
  1814.         - If <expression> is followed by a comma, the effect is
  1815.           the same except that first, a horizontal tab (CHR$(9)) 
  1816.           is sent to the output window.
  1817.         - Note that ASCII 9 does not have exactly the same effect 
  1818.           as an AmigaBASIC tab, but the result is similar. 
  1819.           If spacing is critical, you should use TAB or SPC.
  1820.  
  1821. --------------------------------------------------------------------------------
  1822. PRINT #        - syntax: PRINT #filenumber,<expression>[,|;| ..]
  1823.           where <expression> is a string or numeric value to
  1824.           be printed at the current print location in the 
  1825.           filenumber'th file. 
  1826.         - PRINT can be abbreviated to '?' as in AmigaBASIC.
  1827.         - This version of PRINT # writes values to a file in the 
  1828.           same format as they would appear in a window.
  1829.         - One oddity is that since ACE strings are NULL-terminated,
  1830.           and this NULL (ASCII 0) is normally not displayed, any 
  1831.           attempt to send this character to a file, eg:
  1832.  
  1833.               PRINT #filenumber,CHR$(0) 
  1834.  
  1835.           should by all rights be ignored. However, since some
  1836.           programs write NULLs to files as delimiters, ACE does NOT
  1837.           ignore a lone CHR$(0). A consequence of this is that if
  1838.           you send an empty - LEN(<string>) = 0 - string to a file, 
  1839.           an ASCII 0 will be written. This also holds true for 
  1840.           WRITE #filenumber,<string>. Just check the length of a 
  1841.           string before sending it to a file if in doubt.
  1842.         - Given the above behaviour, use:
  1843.         
  1844.             PRINT #filenumber,CHR$(10)
  1845.           or
  1846.             PRINT #filenumber," "    '..at least 1 space
  1847.  
  1848.           to cause a line-feed to be sent to the file.
  1849.          - See also ERR.
  1850.  
  1851. --------------------------------------------------------------------------------
  1852. PRINTS *    - syntax: PRINTS [<expression>][,|;| ..]
  1853.           where <expression> is a string or numeric value to
  1854.           be printed at the current x,y location of an open
  1855.           screen or Intuition window. SETXY or LOCATE can be used 
  1856.           to set the X,Y coordinates for the next PRINTS command.
  1857.         - This command is now redundant since as of ACE v2.0 PRINT
  1858.           handles DOS and Intuition windows/screens transparently.
  1859.         - However since PRINTS doesn't have to make a decision
  1860.           about whether to print to a DOS or Intuition window, 
  1861.           it is faster than PRINT. It is not intended for use in 
  1862.           a CLI/shell however.
  1863.  
  1864. --------------------------------------------------------------------------------
  1865. PSET        - syntax: PSET [STEP] (x,y)[,color-id]
  1866.         - Plots a point in the current output window or 
  1867.           screen.
  1868.         - If color-id is not specified, the current
  1869.           foreground color is used.
  1870.         - If STEP is specified, the point is relative to
  1871.           the current x,y location as set by the last
  1872.           graphics command.
  1873.  
  1874. --------------------------------------------------------------------------------
  1875. PTAB        - syntax: PTAB(n)
  1876.           where n is in the range: 0..32767
  1877.         - This function is used in conjunction with PRINT to
  1878.           move the horizontal print position for the current 
  1879.            output window to the nth pixel.
  1880.         - Subsequent graphics commands are also affected by
  1881.           PTAB.
  1882.             
  1883. --------------------------------------------------------------------------------
  1884. PUT        - syntax: PUT [#]<fileNum>,<structVar>[,<recordNum>]
  1885.         - Stores the supplied structure in the next or 
  1886.           specified record to a random file corresponding
  1887.           to <fileNum>.
  1888.         - The record number (<recordNum>) is optional. The minimum 
  1889.           <recordNum> is 1, while the maximum value depends upon 
  1890.           available disk space and structure size. 
  1891.         - The file is expanded in size (OS Release 36+, ie. not Wb 1.3) 
  1892.           if <recordNum>*SizeOf(<structVar>) is beyond the current 
  1893.           end-of-file.
  1894.         - See also the ace.doc section, "Random Files".
  1895.  
  1896. --------------------------------------------------------------------------------
  1897. RANDOMIZE    - syntax: RANDOMIZE <expression>
  1898.         - Seeds the random number generator.
  1899.         - In ACE, RANDOMIZE *requires* an argument. TIMER and 
  1900.           all other arguments will be coerced to long integers.
  1901.         - RANDOMIZE TIMER is the most commonly used syntax.
  1902.  
  1903. --------------------------------------------------------------------------------
  1904. READ        - syntax: READ <variable>[,<variableN>..]
  1905.         - Assigns <variable> the value of the next item in the 
  1906.           global data list as created by DATA statements in
  1907.           the current program.
  1908.         - The <variable> must be of the same type as the data 
  1909.           item to be read otherwise an unexpected value will be
  1910.           assigned to <variable>.  
  1911.         - See also DATA (especially re: READing long values).
  1912.     
  1913. --------------------------------------------------------------------------------
  1914. REM        - syntax: REM <comment>
  1915.         - A single-line comment.
  1916.         - All characters after REM until the end of line are 
  1917.           ignored.
  1918.         - REM can be substituted by an apostrophe as in AmigaBASIC.
  1919.         - While REM is treated as a true statement, and must
  1920.           either appear on a separate line or after a ":" in a 
  1921.           multi-statement, an apostrophe followed by a comment
  1922.           can appear anywhere in the text of a program. 
  1923.         - Note that ACE also supports block comments: {..}.
  1924.         - The ACE compiler can handle the three types of comments
  1925.           while the pre-processor APP can only handle the ' and 
  1926.           {..} forms. Some form of commenting is required by APP
  1927.           so that pre-processor commands can be commented out. 
  1928.  
  1929. --------------------------------------------------------------------------------
  1930. REPEAT..UNTIL *    - syntax: REPEAT
  1931.               .
  1932.               .
  1933.               UNTIL <condition>
  1934.  
  1935.           where <condition> is an expression which reduces
  1936.           to a boolean (true/false) value.
  1937.  
  1938.         - Statements between the REPEAT and UNTIL are executed
  1939.           until the <condition> is true (ie: non-zero).      
  1940.         - Styled after the Pascal REPEAT..UNTIL construct.
  1941.         - The loop is always executed at least once.
  1942.  
  1943. --------------------------------------------------------------------------------
  1944. RESTORE        - syntax: RESTORE
  1945.         - Resets the DATA pointer to the first DATA statement
  1946.           in the program.
  1947.         - Note that there is no optional label in the ACE version
  1948.           of RESTORE. This may be added in a future revision.
  1949.  
  1950. --------------------------------------------------------------------------------
  1951. RIGHT$        - syntax: RIGHT$(X$,I)
  1952.         - Returns a string which contains the rightmost I characters
  1953.           of X$.
  1954.         - If I > len(X$), the whole string (X$) is returned.
  1955.         - If I = 0, the NULL string is returned.
  1956.  
  1957. --------------------------------------------------------------------------------
  1958. RND        - syntax: RND[(X)]
  1959.         - The RND function takes an optional parameter and always 
  1960.           returns a single-precision pseudo-random value between 0 
  1961.           and 1.
  1962.         - At present if it is supplied, X is ignored in ACE.
  1963.  
  1964. --------------------------------------------------------------------------------
  1965. SADD        - syntax: SADD(<string-expression>)
  1966.         - Returns the address of <string-expression> which can be
  1967.           a string literal, variable or expression.
  1968.         - Unlike AmigaBASIC, string allocations after a call to
  1969.           SADD have no impact upon the address of <string-expression>.
  1970.         - VARPTR can also safely be used to find the address of
  1971.           a string variable.
  1972.                   
  1973. --------------------------------------------------------------------------------
  1974. SAY        - In ACE, there is a SAY command and a SAY function.
  1975.  
  1976.         SAY command 
  1977.         -----------
  1978.         - syntax: SAY <phoneme-string>[,mode-array]
  1979.         - Same as AmigaBASIC's SAY command: speak a phoneme string.
  1980.         - The <phoneme-string> can be a string literal, expression
  1981.           or variable, while the optional mode-array is a 9-element 
  1982.           (0..8) DIM'd short integer array.
  1983.         - The mode-array is allowed, and the following parameters
  1984.           are supported:
  1985.  
  1986.             Argument     Element    Values        Default    
  1987.             --------     -------    ------        -------
  1988.             pitch         0        65..320        110
  1989.             inflection   1        0 or 1        0    
  1990.             rate         2        40..400        150
  1991.             voice         3        0 or 1        0
  1992.             tuning         4        5000..28000    22200 (Hz)
  1993.             volume         5        0..64        64
  1994.             channel         6        0..11        10
  1995.             mode         7        0 or 1        0
  1996.             control         8              0,1 or 2    0
  1997.  
  1998.         - Inflection=0 allows inflections and emphasis of syllables 
  1999.           while inflection=1 gives a monotone voice.
  2000.         - The voice parameter specifies gender: 0=male; 1=female.
  2001.         - Audio channel values have the same meaning as in AmigaBASIC:
  2002.  
  2003.             Value    Channel(s)
  2004.             -----     ----------
  2005.             0    0
  2006.             1    1
  2007.             2    2
  2008.             3    3
  2009.             4    0 and 1
  2010.             5    0 and 2
  2011.             6    3 and 1
  2012.             7    3 and 2
  2013.             8    either available left channel
  2014.             9    either available right channel
  2015.             10    either available left/right pair of channels
  2016.             11    any available single channel        
  2017.  
  2018.         - Mode is used to specify synchronous or asynchronous speech
  2019.           (0 and 1 respectively).
  2020.         - Control is used when mode=1 to determine what action is
  2021.           to be taken when asynchronous speech is active. If control
  2022.           is set to 0, the current SAY command waits until the last
  2023.           SAY is finished before executing. When control=1 the last
  2024.           SAY statement is cancelled and speech processing stops
  2025.           until the next call to SAY. When control=2 ACE interrupts
  2026.           the last SAY command and initiates the current one.
  2027.         - The defaults are the same as in AmigaBASIC.
  2028.  
  2029.         SAY function    (only works properly under 2.04 or higher)
  2030.         ------------
  2031.         - syntax: SAY(n)
  2032.  
  2033.           where n equals 0, 1 or 2.
  2034.  
  2035.           SAY(0) - returns true or false (-1 or 0) to indicate
  2036.                whether there is currently active asynchronous
  2037.                speech.
  2038.  
  2039.           SAY(1) - returns the width of the "mouth" corresponding
  2040.                to the phoneme being spoken.
  2041.     
  2042.           SAY(2) - returns the height of the "mouth" corresponding
  2043.                to the phoneme being spoken.
  2044.     
  2045.         - SAY(0) allows for monitoring of the asynchronous 
  2046.           speech process (see details of mode-array above).
  2047.         - Use of SAY(1) and SAY(2) allows an animated mouth
  2048.           to be drawn.
  2049.         - SAY(1)'s and SAY(2)'s values reflect the last call
  2050.           to SAY(0) and so must be used in conjunction with 
  2051.           the latter.
  2052.         - Usage of the SAY function is typically like this:
  2053.  
  2054.             SAY ...        '..start asynchronous speech
  2055.  
  2056.             WHILE SAY(0)
  2057.               x = SAY(1)
  2058.               y = SAY(2)
  2059.               .
  2060.                .
  2061.             WEND
  2062.         
  2063. --------------------------------------------------------------------------------
  2064. SCREEN        - The SCREEN statement syntax is the same as in AmigaBASIC:
  2065.  
  2066.             SCREEN screen-id,width,height,depth,mode
  2067.  
  2068.           where mode is one of the following:
  2069.  
  2070.           1 = lores
  2071.           2 = hires
  2072.           3 = lores,interlaced
  2073.           4 = hires,interlaced.
  2074.            5 = HAM (hold-and-modify)    [ACE only]
  2075.           6 = extra-halfbrite        [ACE only]
  2076.  
  2077.         - See also ERR.
  2078.  
  2079.  
  2080.         - The SCREEN function (ACE only) syntax is SCREEN(n), where:
  2081.  
  2082.           SCREEN(0) - Returns a pointer to the Intuition window,
  2083.                   that is, the current output window or default
  2084.                   window for the screen.
  2085.  
  2086.           SCREEN(1) - Returns a pointer to the Intuition screen.
  2087.  
  2088.           SCREEN(2) - Returns a pointer to the rastport of
  2089.                   the default window or current output 
  2090.                   window for the screen.    
  2091.  
  2092.           SCREEN(3) - Returns a pointer to the screen's viewport.
  2093.  
  2094.           SCREEN(4) - Returns a pointer to the screen's bitmap.
  2095.  
  2096.           SCREEN(5) - Returns the width of the screen's font.
  2097.  
  2098.           SCREEN(6) - Returns the height of the screen's font.
  2099.  
  2100.         - A future revision of ACE's SCREEN command will support
  2101.           AGA screen modes.
  2102.  
  2103. --------------------------------------------------------------------------------
  2104. SCREEN BACK    - syntax: SCREEN BACK screen-id
  2105.         - Sends the specified screen to the back of the display.
  2106.  
  2107. --------------------------------------------------------------------------------
  2108. SCREEN CLOSE    - syntax: SCREEN CLOSE screen-id
  2109.         - Closes a single screen. 
  2110.  
  2111. --------------------------------------------------------------------------------
  2112. SCREEN FORWARD    - syntax: SCREEN FORWARD screen-id
  2113.         - Makes the specified screen frontmost.
  2114.  
  2115. --------------------------------------------------------------------------------
  2116. SCROLL        - syntax: SCROLL (xmin,ymin)-(xmax,ymax),delta-x,delta-y
  2117.         - Scrolls bits inside the specified rectangle.
  2118.         - Delta-x and delta-y specify motion right and down 
  2119.           respectively.
  2120.         - Negative delta values produce motion to the left and up.
  2121.  
  2122. --------------------------------------------------------------------------------
  2123. SERIAL *    - syntax: SERIAL(channel,n)
  2124.      
  2125.           where channel is a serial channel identifier from 1..255 
  2126.           and n is a function number from 0..12 (see below).
  2127.  
  2128.         - This function returns information about an open serial 
  2129.           channel.
  2130.         
  2131.           n value
  2132.           -------
  2133.  
  2134.           0    - Returns the number of characters in the serial
  2135.               read buffer. Use this value to determine how many
  2136.               bytes to read from the buffer (see SERIAL READ).
  2137.  
  2138.           1    - Unit number of serial device in use by this channel
  2139.               (see SERIAL OPEN).
  2140.  
  2141.           2    - Baud rate.
  2142.  
  2143.           3    - Parity. Actually the ASCII value of the character
  2144.               representing the selected parity (N,E,O,M,S). Use
  2145.               CHR$ function to recover the character.
  2146.  
  2147.           4    - Number of data bits.
  2148.  
  2149.           5    - Number of stop bits.
  2150.  
  2151.           6    - Number of wires for handshaking: 3 or 7.
  2152.  
  2153.           7    - XON/XOFF feature: 0=disabled; 1=enabled.
  2154.  
  2155.           8     - Shared access mode: 0=disabled; 1=enabled.
  2156.  
  2157.           9    - Fast mode: 0=disabled; 1=enabled.
  2158.  
  2159.          10    - Serial (read) buffer size in bytes.
  2160.  
  2161.          11    - Name of serial device. Actually, the value returned
  2162.               is the address in memory of the name string. Use
  2163.               ACE's CSTR function to convert it to a string.    
  2164.         
  2165.          12    - A 16-bit word representing the status of the serial 
  2166.               port lines and registers.
  2167.  
  2168.               Bit    Active    Symbol    Function
  2169.               ---    ------    ------    --------
  2170.               0    -        Reserved
  2171.               1    -        Reserved
  2172.               2    high    (RI)    Parallel Select on A1000
  2173.                         + Ring-indicator on A500/A2000
  2174.               3    low    (DSR)    Data Set Ready
  2175.               4    low    (CTS)    Clear To Send
  2176.               5    low    (CD)    Carrier Detect
  2177.               6    low    (RTS)    Ready To Send
  2178.               7    low    (DTR)    Data Terminal Ready
  2179.               8    high        Read overrun
  2180.               9    high        Break sent
  2181.              10    high        Break received    
  2182.              11    high        Transmit x-OFFed
  2183.              12    high        Receive x-OFFed
  2184.              13    -        Reserved
  2185.              14    -        Reserved
  2186.              15    -        Reserved
  2187.  
  2188.              If you wanted to test for Carrier Detect, code 
  2189.              such as:
  2190.  
  2191.                 carrier_detect = SERIAL(1,12) AND 32
  2192.  
  2193.              would store 32 in carrier_detect if CD was high
  2194.              (ie. no carrier) and 0 if CD was low (ie. carrier
  2195.              detected). The value 32 is used here since CD is
  2196.              associated with bit 5 and 2^5 is 32. The 1 here
  2197.              means serial channel 1.
  2198.          
  2199.              Note that the above status word is taken directly
  2200.              from querying the serial device associated with a
  2201.              particular channel and the above table is taken
  2202.              directly from the ROM Kernel Ref. Manual: Devices,
  2203.              (1991), pg 278.
  2204.  
  2205.         - For more information about the serial device modes etc, 
  2206.           see SERIAL OPEN command below and Commodore's ROM Kernel 
  2207.           Reference Manual: Devices.
  2208.         - See also ERR.
  2209.  
  2210. --------------------------------------------------------------------------------
  2211. SERIAL CLOSE *    - syntax: SERIAL CLOSE [#] channel
  2212.         - Closes a logical channel to a serial device.
  2213.         - See also ERR.
  2214.     
  2215. --------------------------------------------------------------------------------
  2216. SERIAL OPEN *    - syntax: SERIAL OPEN [#]channel,unit,baud,params[,size][,dev]
  2217.  
  2218.         - This command opens a logical channel to a serial device.
  2219.         - The channel parameter must be in the range 1..255.
  2220.         - The unit parameter tells ACE which serial device unit to
  2221.           open (eg: for a multi-port serial card). Normally however,
  2222.           you should specify 0 for a single serial port.
  2223.         - The baud rate is specified by the baud parameter. This value
  2224.           can be in the range 110..292,000 on the Amiga.
  2225.  
  2226.         - The next parameter is a string consisting of at least three 
  2227.           single character "switches":
  2228.  
  2229.             parity         - N,E,O,M or S. Other = N.
  2230.             data bits    - usually 7 or 8.
  2231.             stop bits    - usually 1 or 2.
  2232.  
  2233.             wires        - 3 or 7. Other = 7.
  2234.             XON/XOFF    - X = enabled. Other = disabled.
  2235.             Access        - S = shared. Other = exclusive. 
  2236.             Fast mode    - F = fast mode. Other = normal.
  2237.         
  2238.         - Parity, data bits and stop bits MUST be specified and 
  2239.           in the order shown above, while the remaining switches 
  2240.           are optional and can be given in any order. 
  2241.         - Fast mode is intended for use in conjunction
  2242.           with peripherals which require high serial 
  2243.           throughput, eg. a MIDI device. Higher throughput
  2244.           is achieved by certain internal serial device checks
  2245.           being skipped. Fast mode should be used only when:
  2246.           parity checking has been disabled, XON/XOFF handling 
  2247.           is disabled and 8 bit characters are in use.
  2248.         - For a letter, upper or lower case can be used.
  2249.         - In the above description of switches "Other" means any
  2250.           other character (I suggest you use "?" or some other
  2251.           character consistently, to indicate "don't care").
  2252.  
  2253.         - The optional parameter "size" specifies the size of the 
  2254.           serial *read* buffer. At high baud rates the buffer can 
  2255.           fill up quickly. The default is 512 bytes.
  2256.         - The final parameter (dev) is also optional. This specifies
  2257.           the name of the serial device to be used. The device name
  2258.           defaults to "serial.device" if not specified. An alternate
  2259.           serial device can be used as long as the device's commands
  2260.           are compatible with the standard serial.device supplied with
  2261.            the Amiga. This device normally lives in the DEVS: directory.
  2262.         - If using another serial device, simply supply its name
  2263.           if it resides in the DEVS: directory, otherwise a full 
  2264.           path must be specified.
  2265.  
  2266.         - Here's a typical example of SERIAL OPEN usage:
  2267.  
  2268.               SERIAL OPEN 1,0,2400,"N81",1024
  2269.  
  2270.           which opens a channel (#1) to the standard serial device
  2271.           with a baud rate of 2400, no parity, 8 data bits and 1
  2272.           stop bit. All 7 wires will be used for handshaking and
  2273.           the serial read buffer size will be set to 1K.
  2274.         - See also ERR.
  2275.           
  2276. --------------------------------------------------------------------------------
  2277. SERIAL READ *    - syntax: SERIAL READ [#] channel,buffer,length           
  2278.         - Tells ACE to read length bytes from the serial buffer
  2279.           corresponding to the (open) logical channel into a string
  2280.           buffer.
  2281.         - The buffer can be a string variable or array.
  2282.         - Note that this command will wait for the serial port
  2283.           read to complete before returning control to your program,
  2284.           so use SERIAL(channel,0) to find out how many bytes are
  2285.           waiting on the port and make length equal to that value.
  2286.          - See also ERR.
  2287.  
  2288. --------------------------------------------------------------------------------
  2289. SERIAL WRITE *    - syntax: SERIAL WRITE [#] channel,string,length       
  2290.         - Tells ACE to write length bytes to the serial port
  2291.           corresponding to the (open) logical channel from a 
  2292.           string buffer.
  2293.         - The string buffer can be any string expression.
  2294.         - See also ERR.
  2295.                  
  2296. --------------------------------------------------------------------------------
  2297. SETHEADING *     - syntax: SETHEADING n
  2298.         - Changes the turtle's heading to n degrees.
  2299.  
  2300. --------------------------------------------------------------------------------
  2301. SETXY *        - syntax: SETXY x,y
  2302.         - Sets the x,y location for the next graphics command
  2303.           in the current output window or open screen.
  2304.         - Its primary use is for turtle graphics. To prevent the 
  2305.           "turtle" drawing a line when SETXY is used, the PENUP 
  2306.           command should first be issued.
  2307.  
  2308. --------------------------------------------------------------------------------
  2309. SGN        - syntax: SGN(n)
  2310.         - Returns the sign of the number n:
  2311.  
  2312.             if n>0, SGN(n) returns  1
  2313.             if n=0, SGN(n) returns  0
  2314.             if n<0, SGN(n) returns -1
  2315.  
  2316. --------------------------------------------------------------------------------
  2317. SHARED        - syntax: SHARED <ident>[,<ident> ... ]
  2318.         - Variables, arrays and structures must explicitly
  2319.           be shared between the main program and subprograms.
  2320.         - Only EXTERNAL variables are exempt from such sharing in
  2321.           ACE since they are global (see "Identifiers" in ace.doc).
  2322.         - One or more SHARED statements can appear in a subprogram
  2323.           and are usually placed before all other code in that SUB.
  2324.         - Declarations of objects to be shared must appear in the 
  2325.           main program before the subprogram is *declared*.
  2326.         - See subprograms section in ace.doc and the entry for
  2327.           DIM above re: DIM SHARED.
  2328.  
  2329. --------------------------------------------------------------------------------
  2330. SHL *        - syntax: SHL(n,m) 
  2331.           where n is the value to be shifted and m is the number 
  2332.           of bit positions to shift.        
  2333.         - Arithmetic shift left function. Returns a long integer. 
  2334.         - Shifting left by 1 bit (or more) is faster than multiplying 
  2335.           by 2 (or powers thereof).  
  2336.  
  2337. --------------------------------------------------------------------------------
  2338. SHR *        - syntax: SHR(n,m) 
  2339.           where n is the value to be shifted and m is the number 
  2340.           of bit positions to shift. 
  2341.         - Arithmetic shift right function. Returns a long integer.
  2342.         - Shifting right by 1 bit (or more) is faster than dividing 
  2343.           by 2 (or powers thereof).  
  2344.  
  2345. --------------------------------------------------------------------------------
  2346. SHORTINT *    - syntax: SHORTINT <identifier>[,..]
  2347.         - Declares and initialises one or more short integer 
  2348.           variables.
  2349.  
  2350. --------------------------------------------------------------------------------
  2351. SINGLE *    - syntax: SINGLE <identifier>[,..]
  2352.         - Declares and initialises one or more single-precision 
  2353.           variables.
  2354.  
  2355. --------------------------------------------------------------------------------
  2356. SIZEOF *    - syntax: 
  2357.           SIZEOF(byte|shortint|longint|address|single|string|<ident>)
  2358.           where <ident> is the name of a variable, array, structure
  2359.           type or structure variable (not a SUB, function or external
  2360.           variable).
  2361.         - A size in bytes is returned.
  2362.         - The intention is the same as that of C's sizeof() operator.
  2363.         - SIZEOF is most useful when allocating memory for structures.
  2364.  
  2365. --------------------------------------------------------------------------------
  2366. SIN        - syntax: SIN(n)
  2367.         - Returns the sine of n.
  2368.  
  2369. --------------------------------------------------------------------------------
  2370. SLEEP        - syntax: SLEEP
  2371.         - This command puts a program to sleep until there is 
  2372.           mouse, menu or keyboard activity. The program will
  2373.           also be woken up by IntuiTicks (timer signals from a
  2374.           user-defined window or default screen window) at regular 
  2375.           intervals (every ~0.1 of a second) so your program can 
  2376.           perform other tasks.
  2377.         - If SLEEP is called when the current output window is
  2378.           a CLI/shell, SLEEP returns control to your program 
  2379.           immediately.
  2380.         - Once a window loses the "focus" SLEEP waits indefinitely.
  2381.           If this is likely to happen, you might want to use the 
  2382.           SLEEP FOR command instead.
  2383.  
  2384. --------------------------------------------------------------------------------
  2385. SLEEP FOR *    - syntax: SLEEP FOR <seconds>
  2386.         - Suspends execution of a program for the specified number
  2387.           of seconds, which can be a single-precision floating point
  2388.           value greater than 0 (including values between 0 and 1).
  2389.         - This command does NOT use a busy waiting method. Instead
  2390.           it relies upon the dos.library Delay() function to delay
  2391.           execution in a system-friendly way, without hogging CPU 
  2392.           time.
  2393.         - The smallest practical value for <seconds> is 0.02 since
  2394.           there are 50 ticks per second and 50*0.02 = 1 tick. Any
  2395.           value less than 0.02 will therefore cause SLEEP FOR to
  2396.           return immediately. This would have the same effect as
  2397.           busy waiting which hogs CPU time. To see the effect of
  2398.           various values of <seconds> run the following program
  2399.           with the system tool PerfMon running:
  2400.  
  2401.             WHILE INKEY$=""
  2402.               SLEEP FOR n        '..where n is <seconds>
  2403.             WEND
  2404.  
  2405.         - You should notice that as <seconds> approaches zero,
  2406.           CPU time looks more like it would if you had used
  2407.           the above loop without SLEEP FOR at all.
  2408.  
  2409. --------------------------------------------------------------------------------
  2410. SOUND        - syntax: SOUND period,duration[,volume][,voice]
  2411.         - Note that the syntax of this command is different
  2412.           from the equivalent statement in AmigaBASIC.
  2413.         - See the sound section in ace.doc for details.
  2414.         - See also the WAVE command. A combination of
  2415.           these two commands in ACE allows you to easily
  2416.           play sound samples (see example program play.b).
  2417.         - SOUND currently uses the audio hardware directly
  2418.           but a future enhanced version will use the audio device.
  2419.  
  2420. --------------------------------------------------------------------------------
  2421. SPACE$        - syntax: SPACE$(n)
  2422.         - Returns a string of n spaces.
  2423.  
  2424. --------------------------------------------------------------------------------
  2425. SPC        - syntax: SPC(n)
  2426.         - This function is generally used in conjunction with PRINT
  2427.           and returns a string of n spaces, where n is a value from
  2428.           0 to 255.
  2429.   
  2430. --------------------------------------------------------------------------------
  2431. SQR        - syntax: SQR(n)
  2432.         - Returns the square root of n.
  2433.         - The argument n must be >= 0.
  2434.  
  2435. --------------------------------------------------------------------------------
  2436. STICK        - syntax: STICK(n)
  2437.         - Returns information about joystick direction.
  2438.         - At the moment, STICK(0) & STICK(1) always return 0,
  2439.           while STICK(2) & STICK(3) return the state of
  2440.           the joystick in port 2 (B), where:
  2441.  
  2442.             STICK(2) is joystick B in X direction.
  2443.             STICK(3) is joystick B in Y direction.
  2444.         
  2445.         - Return values are:
  2446.  
  2447.              0 = joystick is not engaged.
  2448.              1 = movement is upward or to the right.
  2449.             -1 = movement is downward or to the left.
  2450.         - STICK currently goes straight to the hardware. A future
  2451.           revision may use the gameport device.    
  2452.  
  2453. --------------------------------------------------------------------------------
  2454. STOP        - This is functionally equivalent to END in ACE.
  2455.         - See also IF..[ELSE]..END IF.
  2456.  
  2457. --------------------------------------------------------------------------------
  2458. STR$        - syntax: STR$(n)
  2459.         - Returns the string representation of the numeric value n.
  2460.          - The string includes a leading space or "-" depending upon
  2461.           the sign of the number.
  2462.  
  2463. --------------------------------------------------------------------------------
  2464. STRIG        - syntax: STRIG(n)
  2465.         - Returns information about the state of a joystick button.
  2466.         - At the moment, STRIG(0), STRIG(1) & STRIG(2) always
  2467.           return 0. 
  2468.         - STRIG(3) returns -1 if the port 2 joystick's
  2469.           fire button is *currently* pressed and 0 if it isn't.
  2470.         - STRIG currently goes straight to the hardware. A future
  2471.           revision may use the gameport device.    
  2472.  
  2473. --------------------------------------------------------------------------------
  2474. STRING *    - syntax: STRING <ident> [[ADDRESS <addr>] | [SIZE <size>]][,..]
  2475.         - Declares and initialises one or more string variables
  2476.           with an optional size or address. If the size is not 
  2477.           specified, a length of MAXSTRINGLEN bytes is assumed.
  2478.         - If an address is specified, the SIZE option can't be used
  2479.           since the size of the area of memory pointed to by <addr>
  2480.           has already been determined.
  2481.  
  2482. --------------------------------------------------------------------------------
  2483. STRING$        - syntax: STRING$(I,J) or STRING(I,X$).
  2484.         - STRING$ returns a string of length I consisting of characters
  2485.           with ASCII code J or ASC(MID$(X$,1,1)).
  2486.  
  2487. --------------------------------------------------------------------------------
  2488. STRUCT *    - Defines a new structure data type, thus:
  2489.  
  2490.           STRUCT <ident>
  2491.             <type> <ident1>
  2492.             <type> <ident2>
  2493.             .
  2494.             .
  2495.             <type> <identN>
  2496.           END STRUCT
  2497.  
  2498.           where <type> can be BYTE,SHORTINT,LONGINT,ADDRESS,SINGLE,
  2499.           STRING and <ident1>..<identN> are structure members of one
  2500.           of these data types.
  2501.         - A structure member may also be another structure. In this
  2502.           case, <type> must be the name of a previously defined 
  2503.           structure type. See ace.doc's "Structures" section for 
  2504.           more about this.
  2505.         - Where a member is of type STRING, an optional size can be
  2506.           specified (STRING <ident> [SIZE <size>]).
  2507.         - See also: DECLARE and the section on structures in ace.doc.
  2508.         - Structures have been provided in ACE primarily to make
  2509.           communicating with the operating system a little nicer
  2510.           and to make dynamic data structures possible (see the
  2511.           example programs turtle/bst.b and misc/linkedlist.b).
  2512.         - ACE structures cannot currently be array elements although
  2513.           there is nothing to stop you from storing structure start
  2514.           addresses in array elements. For an example of this, see  
  2515.           prgs/misc/array_of_structs.b.
  2516.         - See "Structures" section in ace.doc for more details.
  2517.             
  2518. --------------------------------------------------------------------------------
  2519. STYLE *        - syntax: STYLE n
  2520.         - Changes the text style for the current output window
  2521.           (user-defined window or shell).
  2522.         - The single parameter can take on the following values:
  2523.  
  2524.           n    Effect
  2525.           -    ------
  2526.           0    Plain
  2527.           1    Underlined
  2528.           2    Bold
  2529.           4    Italic
  2530.           8    Extended width    (non-shell/CLI window only)
  2531.  
  2532.         - These values can be added to produce cumulative effects
  2533.           (eg: n=3 gives bold and underlined text).
  2534.  
  2535. --------------------------------------------------------------------------------
  2536. SUB..END SUB    - syntax: 
  2537.  
  2538.           SUB [<type>] <ident> [([<type>] <param> [..])] [EXTERNAL]
  2539.               <statement1>
  2540.                 <statement2>
  2541.                 .
  2542.                 .
  2543.                 <statementN>    
  2544.           END SUB
  2545.  
  2546.           where the optional <type> is one of: LONGINT,ADDRESS,
  2547.           SHORTINT,SINGLE or STRING.    
  2548.         - In ACE, subprograms are non-static, allow recursion, may 
  2549.           have return values and have optional parameter lists.
  2550.         - Parameters are call-by-value but ACE does provide mechanisms
  2551.           for call-by-reference parameters.
  2552.         - SHARED variables are supported in ACE (see SHARED command). 
  2553.         - Note that since ACE SUBs are non-static, the STATIC keyword
  2554.           is not allowed.
  2555.         - The optional EXTERNAL keyword makes the subprogram 
  2556.           visible to other ACE modules. 
  2557.         - See "Subprograms" section in ace.doc for more details.
  2558.  
  2559. --------------------------------------------------------------------------------
  2560. SWAP        - syntax: SWAP <object>,<object>
  2561.           where <object> is a simple/external variable, parameter,
  2562.           array element, structure or structure member.
  2563.         - This command swaps the value of the specified data objects.
  2564.         - SWAP is not intended to be used for exchanging two whole 
  2565.           arrays.
  2566.         - ACE currently assumes a maximum length of MAXSTRINGLEN
  2567.           when swapping strings.
  2568.  
  2569. --------------------------------------------------------------------------------
  2570. SYSTEM        - syntax 1: SYSTEM n
  2571.           where n is an integer exit value (return code).
  2572.         - SYSTEM causes an ACE program to exit with the specified
  2573.           return code. The latter can be tested in a shell script
  2574.           as WARN, ERROR etc. This value is hidden from a Workbench
  2575.           launched program. 
  2576.         - Note that in AmigaBASIC, SYSTEM returns from the interpreter
  2577.           to the shell/CLI or Workbench. The same is true in ACE, 
  2578.           except that END and STOP will also do this, so SYSTEM's
  2579.           intended purpose in ACE is different to that in AmigaBASIC.
  2580.  
  2581.     OR
  2582.  
  2583.         - syntax 2: SYSTEM command-string
  2584.         - This version of the SYSTEM command attempts to run a 
  2585.           shell/CLI command. It is equivalent to the following
  2586.           dos.library command: Execute(command-string,stdin,stdout).
  2587.         - If the command writes to standard output, make sure you 
  2588.           are running the program from a shell/CLI or at least
  2589.           that you have given the EXTERNAL stdout variable a valid
  2590.           value corresponding to an open file's handle, typically a 
  2591.           CON: or RAW: window (see HANDLE function).
  2592.         - Also, make sure that "Run" is in your C: directory.
  2593.         - Examples:
  2594.  
  2595.             SYSTEM "list"       '..lists files in current directory
  2596.  
  2597.             SYSTEM "dir > fred" '..runs dir command and redirects
  2598.                     '..output to a file called fred.
  2599.  
  2600.     OR
  2601.  
  2602.         - syntax 3: SYSTEM
  2603.         - This *function* returns the Exec library version, enabling
  2604.           your program to do different things depending upon the 
  2605.           version of the operating system under which it is running.
  2606.         - A value of 34 indicates Workbench 1.3 while 37 indicates
  2607.           Workbench 2.04.
  2608.  
  2609. --------------------------------------------------------------------------------
  2610. TAB        - syntax: TAB(n)
  2611.         - Used in conjunction with PRINT to move the print position
  2612.           to the nth column.
  2613.         - TAB(n) - where n=1..81. 
  2614.         - if n>81, wraparound will occur in a DOS window while
  2615.           a user-defined (Intuition) window/screen will clip any 
  2616.           output past the last character position.
  2617.         - if n<1, the next print position will be column 1 (leftmost).  
  2618.  
  2619. --------------------------------------------------------------------------------
  2620. TAN        - syntax: TAN(n)
  2621.         - Returns the tangent of n.
  2622.  
  2623. --------------------------------------------------------------------------------
  2624. TIME$        - syntax: TIME$
  2625.         - Returns the current time as a string of the format:
  2626.  
  2627.             hh:mm:ss
  2628.  
  2629.           where hh is hours, mm is minutes and ss is seconds.
  2630.  
  2631. --------------------------------------------------------------------------------
  2632. TIMER        - syntax: TIMER
  2633.         - Returns a single-precision value corresponding to 
  2634.           seconds elapsed since midnight.
  2635.  
  2636. --------------------------------------------------------------------------------
  2637. TIMER ON ..    - syntax: TIMER ON|OFF|STOP 
  2638.         - These commands are used for enabling, disabling and 
  2639.           suspending ON TIMER(n) event trapping.
  2640.         - See the Event Trapping section in ace.doc.
  2641.         
  2642. --------------------------------------------------------------------------------
  2643. TRANSLATE$    - syntax: TRANSLATE$(<string-expression>)
  2644.         - Returns the phoneme-string equivalent of <string-expression> 
  2645.           where the latter contains words.
  2646.  
  2647. --------------------------------------------------------------------------------
  2648. TURN *        - syntax: TURN n
  2649.         - Rotates the turtle by n degrees.
  2650.         - If n is negative, the turtle will rotate counter-clockwise
  2651.           while if it is positive, the rotation will be clockwise.
  2652.  
  2653. --------------------------------------------------------------------------------
  2654. TURNLEFT *    - syntax: TURNLEFT n
  2655.         - Rotates the turtle counter-clockwise by n degrees.
  2656.         - If n is negative, the result will be the same as
  2657.           TURNRIGHT ABS(n).    
  2658.     
  2659. --------------------------------------------------------------------------------
  2660. TURNRIGHT *    - syntax: TURNRIGHT n
  2661.         - Rotates the turtle clockwise by n degrees.
  2662.         - If n is negative, the result will be the same as
  2663.           TURNLEFT ABS(n).    
  2664.  
  2665. --------------------------------------------------------------------------------
  2666. UCASE$        - syntax: UCASE$(<string-expression>)
  2667.         - Returns <string-expression> with all alphabetic characters 
  2668.           in upper case. 
  2669.  
  2670. --------------------------------------------------------------------------------
  2671. VAL        - syntax: VAL(X$)
  2672.         - Returns the numeric value of X$ as a single-precision
  2673.           number.
  2674.         - The translation of integers plus fixed-point and exponential
  2675.           format single-precision values is supported.
  2676.         - The hexadecimal and octal prefixes (&H and &O) are also 
  2677.           recognised by VAL.
  2678.         - VAL strips off leading whitespace (eg: spaces, tabs).
  2679.          - There may be a loss of accuracy if the string contains a 
  2680.           LARGE long integer value, due to the limitations of the 
  2681.           single-precision numeric format. To overcome this, use 
  2682.           the LONGINT(n) function.
  2683.  
  2684. --------------------------------------------------------------------------------
  2685. VARPTR        - syntax: VARPTR(<data-object>)
  2686.         - Returns the absolute address of a numeric variable, 
  2687.           string, array, array element, structure, structure 
  2688.           member, external function or subprogram.
  2689.         - You can safely use VARPTR to find a string variable's 
  2690.           address (SADD has also been provided for string variables
  2691.           and expressions).
  2692.         - Unlike AmigaBASIC, an object's address does not move 
  2693.           around in memory once allocated.
  2694.         - In ACE, the symbol "@" can be used instead of VARPTR, 
  2695.  
  2696.               eg: addr& = @n(2) '..finds address of an array element 
  2697.  
  2698.         - When used in conjunction with a structure variable x, 
  2699.           @x will return the address of the variable itself, NOT 
  2700.           the start address of the structure (see "Structures" in
  2701.           ace.doc for more).
  2702.         - See also section on indirection operators in ace.doc.
  2703.  
  2704. --------------------------------------------------------------------------------
  2705. WAVE        - syntax: WAVE voice,SIN | [waveform-address,byte-count]
  2706.         - Defines a waveform of any length to be used by the SOUND 
  2707.           statement for a specified audio channel (voice: 0..3).
  2708.         - If the SIN option is used, a sine waveform table is 
  2709.           allocated to the specified channel. This is the default
  2710.           waveform for the SOUND statement.
  2711.         - Unlike AmigaBASIC, the number of bytes in the waveform 
  2712.           table must be specified when SIN is not used.
  2713.         - See also the Sound section in ace.doc.
  2714.         
  2715. --------------------------------------------------------------------------------
  2716. WHILE..WEND    - syntax: WHILE <condition>
  2717.               .
  2718.               .
  2719.               WEND
  2720.  
  2721.           where <condition> is an expression which reduces
  2722.           to a boolean (true/false) value.
  2723.  
  2724.         - Statements inside the WHILE and WEND are executed
  2725.           while the <condition> is true (ie: non-zero).    
  2726.     
  2727. --------------------------------------------------------------------------------
  2728. WINDOW        - syntax:
  2729.           WINDOW id,[title-string],(x1,y1)-(x2,y2)[,type][,screen-id]
  2730.  
  2731.           where screen-id specifies the screen to which the window
  2732.           should be attached and type can be a combination of the 
  2733.           following (31 is the default if type is not specified):
  2734.  
  2735.             Type        Effect
  2736.             ----        ------
  2737.             1        Window size can be changed via
  2738.                     sizing gadget.
  2739.  
  2740.             2        Window can be moved about using
  2741.                     the title bar.
  2742.  
  2743.             4        Window can be moved from front to
  2744.                     back using the Back gadget.
  2745.                     
  2746.             5        Under Release 2.x of the OS, when
  2747.                     this Type value is specified alone
  2748.                     or as a component of larger Type 
  2749.                     value (eg: 7,15,23) a zoom gadget 
  2750.                     is added to the window allowing it 
  2751.                     to be switched between the two most 
  2752.                     recent window sizes.
  2753.  
  2754.             8        Close gadget added to window.
  2755.                     
  2756.             16        Contents of window reappear after
  2757.                     it has been covered.
  2758.     
  2759.             32        Window will be borderless.
  2760.  
  2761.         - The window-id must be from 1 to 16. See also docs/history
  2762.           entry for 4/12/95.
  2763.  
  2764.         - Note that if the rectangle as specified in the WINDOW 
  2765.           command is too large (according to screen mode), the 
  2766.           window won't open. 
  2767.         - See also ERR.
  2768.                 
  2769.     OR
  2770.  
  2771.         - syntax: WINDOW(n)
  2772.         - This function returns information related to ACE windows.
  2773.          
  2774.           WINDOW(0)  - window-id of the selected output window.
  2775.           WINDOW(1)  - window-id of current output window.
  2776.           WINDOW(2)  - present width of current output window.
  2777.           WINDOW(3)  - present height of current output window.
  2778.           WINDOW(4)  - x-coordinate in current output window where 
  2779.                    next pixel will be plotted.
  2780.           WINDOW(5)  - y-coordinate in current output window where 
  2781.                    next pixel will be plotted.
  2782.             WINDOW(6)  - max legal colour-id for current output window.
  2783.           WINDOW(7)  - pointer to Intuition Window for current output 
  2784.                    window.
  2785.           WINDOW(8)  - pointer to Rastport of current output window.
  2786.           WINDOW(9)  - pointer to AmigaDOS file handle for current 
  2787.                    output window (non-zero for shell/CLI only).
  2788.           WINDOW(10) - foreground pen in current output window.
  2789.           WINDOW(11) - background pen in current output window.
  2790.           WINDOW(12) - font width for current output window.
  2791.           WINDOW(13) - font height for current output window.
  2792.  
  2793.         - See the section on Windows in ace.doc for more details.  
  2794.  
  2795. --------------------------------------------------------------------------------
  2796. WINDOW CLOSE    - syntax: WINDOW CLOSE id
  2797.         - Closes the id'th window if it is open.
  2798.  
  2799. --------------------------------------------------------------------------------
  2800. WINDOW ON .. *    - syntax: WINDOW ON|OFF|STOP 
  2801.         - These commands are used for enabling, disabling and 
  2802.           suspending ON WINDOW event trapping.
  2803.         - See the Event Trapping section in ace.doc.
  2804.  
  2805. --------------------------------------------------------------------------------
  2806. WINDOW OUTPUT     - syntax: WINDOW OUTPUT id 
  2807.         - Makes the id'th open window the current output window.
  2808.  
  2809. --------------------------------------------------------------------------------
  2810. WRITE #        - syntax: WRITE #filenumber,expression-list
  2811.           where filenumber corresponds to an open file.
  2812.         - The expression-list can contain any combination
  2813.           of data items (constants, variables) of any type
  2814.           separated by commas.
  2815.         - Note that the form of WRITE allowing for screen
  2816.           output is not supported by ACE.
  2817.         - See PRINT# re: the treatment of CHR$(0) in file I/O by ACE. 
  2818.         - See also INPUT# and the section on files in ace.doc. 
  2819.          - See also ERR.
  2820.  
  2821. --------------------------------------------------------------------------------
  2822. XCOR *        - Returns the turtle's current x-coordinate.
  2823.  
  2824. --------------------------------------------------------------------------------
  2825. YCOR *        - Returns the turtle's current y-coordinate.
  2826.  
  2827. --------------------------------------------------------------------------------
  2828. XOR        - Boolean operator: X XOR Y.
  2829.  
  2830.             X Y    Out
  2831.             -----------
  2832.             T T    F
  2833.             T F    T
  2834.             F T    T
  2835.             F F    F
  2836.