home *** CD-ROM | disk | FTP | other *** search
/ Fresh Fish 5 / FreshFish_July-August1994.bin / bbs / dev / ace-ag-docs.lha / ACE-AG-Docs / Ref.Guide < prev   
Encoding:
Text File  |  1994-03-26  |  103.8 KB  |  2,452 lines

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