<!-- PDF page 292 -->

| Keyword | Meaning |
|---|---|
| **CONTINUE** | Continues the program, starting where it left off last time it stopped with report other than 0. |
| **COPY** | Sends (dumps) a copy of the screen display to a ZX Printer or compatible. |
| **COPY** u **TO SCREEN$** | Displays the contents of a file defined by filespec u on the screen. Control characters (tabs, line feeds, etc.) are replaced by spaces. |
| **COPY** u1 **TO** u2 | Copies file(s) defined by filespec u1 to the destination defined by filespec u2 |
| **DATA** list ... | Part of the DATA list. Must be in a program, otherwise has no effect. |
| **DEF FN ?** (?1,..., ?k)=e | User-defined function definition; must be in a program. Each of ? and ?1 to ?k is either a single letter or a single letter followed by **$** for string argument or result.Takes the form DEF FN a()=e if no arguments. |
| **DEFPROC** name ([paramlist]) | Defines a procedure, where name follows the same naming rules as standard numeric variables. paramlist is an optional list of up to 8 variable names (simple strings, numeric variables or integer variables, but not arrays of any type). See ENDPROC. |
| **DIM** #n,var | Returns the extent (or size) of stream n and stores it in variable var. |
| **DIM** ?( n1 , . . . ,nk ) | Deletes any array or string with the name ?, and sets up an array of characters or numbers with k dimensions n1 ,...,nk. Initialises all the values to [?]. This can be considered as an array of strings of fixed length nk , with k-1 dimensions n1,...,nk-1 . An array is undefined until it is dimensioned in a DIM statement. |
| **DRAW** x,y [,z] | Draws a line from the current plot position moving x horizontally and y vertically relative to it while turning through an optional angle z |
| **DRIVER** drid,callid[,n1[,n2]] [**TO** var1[,var2[,var3]]] | Call function callid in driver drid, where n1 and n2 are optional values to pass to the driver, and var1, var2 and var3 are optional variables to receive results back from the driver. |
| **ELSE** | See IF ... THEN ... ELSE |
| **ENDPROC** [= expressionlist] | Ends execution of a procedure defined with DEFPROC and returns up to 8 local values via the optional expressionlist to the calling PROC command. |
| **ERASE** [m,n] | Erases the entire NextBASIC program and leaves variables intact. If specified with the optional m and n parameters, erases all program lines between m and n inclusive. |
| **ERASE** filespec | ERASES all files specified by filespec. Cannot erase entire drives |
| **ERROR** [**TO** e[,**l**[,s[,b]]]] | Regenerate the last error that was trapped by an ON ERROR command and store it in optional variables e, l, s, b (for error code, line, statement number and bank) |
| **FLASH** n | Defines whether characters will be flashing or steady. |
| **FOR** ?=x **TO** y [**STEP** z] | Deletes any simple variable ? and sets up a control variable with value x, limit y, optional step z (or 1 if STEP is not defined), and looping address referring to the statement after the FOR statement. See NEXT. |
| **GO TO** n | Jumps to line n (or, if there is none, the first line after that). See also BANK...GO TO. |
| **GO TO** #n, m | Sets the current position of stream n to m. |
| **GOSUB** n | Pushes the line number of the GOSUB statement onto a stack; then as GO TO n. See also RETURN and BANK...GOSUB. |
| **IF** x **THEN** y [: **ELSE** z] | If x is true (non-zero) then statement list y is executed, otherwise optional statement list z is executed. ELSE must be on the same line as IF. |
| **INK** n | Sets the ink (foreground) colour of characters subsequently printed. |
| **INPUT** [#n] [**LINE**] inputitems | INPUTs inputitems from the keyboard or optional stream n. Optional LINE modifier strips the quotes from the input items |
| **INVERSE** n | Inverts the next printed character(s) from **INK** to **PAPER** |
| **LAYER AT** x,y | Sets the display offset for the top-left of the screen for the current layer to x,y. |
| **LAYER BANK** n,m | (Layer 2 only). Set current banks n...n+2 as frontbuffer (to be displayed) and banks m...m+2 as backbuffer (for rendering). |
| **LAYER CLEAR** | Resets all layer information to the default values. Resets memory banks, mode, layer 2 enable, layer offsets and layer ordering. Also done by NEW |
| **LAYER DIM** x1,y1,x2,y2 | Sets the clip window for the current layer from (x1,y1) to (x2,y2). Areas of the layer outside this window are not visible. |
| **LAYER ERASE** x,y,w,h[,f] | Fill region width w pixels, height h pixels, top-left corner x,y with optional value f. If f is not specifed, 0 is used. |
| **LAYER** m[,n] | Selects the screen layer m and optional mode m. |
| **LAYER OVER** n | Sets sprite/layer SLU ordering |
| **LAYER PALETTE** n [**BANK** m,o ]\| n,i,v | Switch to using palette n (0 or 1) for the current layer and optionally sets palette from bank m, offset o -or- defines index **l** for palette n as 9-bit colour v |
| **LET** [%]v = [%]e | Assigns the value of [optionally integer] expression e to the [optionally integer] variable v. LET cannot be omitted. |
| **LINE** start, step\|m,n **TO** mm,nn | Either renumbers an entire NextBASIC program starting with line start with an increment of step -or- a section of the NextBASIC program, beginning with line m and ending with line n, with the new starting line number mm and incrementing by nn. |
| **LINE MERGE** first,last | Merges lines from first to last into a single line (separated by colons). Can only be used as a direct command, not within a program. |
| **LIST** [[#n],] [m\|**PROC** name] | Lists the current program to the screen or optional stream number starting with optional line m -or- PROC name. See also BANK...LIST and LLIST |
| **LLIST** [m] | Like LIST but using the printer |

