home *** CD-ROM | disk | FTP | other *** search
/ AMIGA PD 1 / AMIGA-PD-1.iso / Programme_zum_Heft / Programmieren / Kurztests / ACE / Docs / ref.doc < prev    next >
Text File  |  1995-03-13  |  107KB  |  2,665 lines

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