Directives |
|
Directives are commands that instruct the system to perform a task. A directive is the first keyword in a valid program statement. There may be more than one directive in a statement.
Below is a list of some commonly used directives. For a list of all directives, see Directives.
Re-initialize current session; close files, clear all non-global variables, release memory to the system. See CLEAR and RESET directives. | |
Terminate session; close all opened files, return memory to the operating system and terminate PxPlus. See QUIT and RELEASE directives. | |
Change working directory. | |
Remove lines from program or if no lines specified, unload program. | |
Print all variables in use (including ERR system variable), program name, line number, and the FOR..NEXT/ GOSUB stack. | |
Change an existing statement. | |
Terminate execution of program (functionally identical to STOP directive). | |
Transfer control to line referenced. | |
Issue prompt and process response. | |
Assign value to a variable. | |
Convert program statements to readable format and output to display or file. | |
Read a program into memory for execution, listing, or modification. | |
Display a message window in the middle of the screen. | |
Send information to display or a file (if file number specified). | |
Start or continue execution of a program. | |
Copy current program to file specified. | |
Reset files and variables (including global files and variables). |
The PRINT directive (or ? shortcut) displays a string literal at the console (with output positioning determined via the @ function):
print "HELLO WORLD"
? @(10,10),"HELLO WORLD"
The LET directive assigns values to a string variable and a global string variable:
let X$="HELLO"
let %X$="JELLO"
The LOAD and the LIST directives are used to view a program (options for the LIST directive include listing a range and displaying with indentation):
load "**" *1
list
list 5100,5220 *2
list edit 5100,5220 *3
The DELETE directive removes lines from a program:
delete 5100,5220 *4
The DELETE directive removes the program from memory:
delete
The RUN directive loads and runs a program (the END directive halts execution):
run "**
stop execution <ctrl+break>
end