Programming#

Program control#

changeDir

Changes the working directory within a program.

end

Terminates a program and closes all files.

pause

Pauses for the specified time.

sleep

Sleeps for the specified time.

stop

Stops a program and leaves files open.

system

Quits and returns to the OS.

Flow control#

break

Jumps out the bottom of a do or for loop.

continue

Jumps to the top of a do or for loop.

do while, do until

Executes a series of statements in a loop based on a conditional statement.

for

Loops with integer counter.

if, else, elseif, endif

Conditional branching.

wait, waitc

Waits until any key is pressed.

Error handling and debugging#

debug

Executes a program under the source level debugger.

error

Creates user-defined error code.

errorlog

Sends an error message to screen and log file.

errorlogat

Sends an error message with the line number of the error report to the screen and log file.

#lineson, #linesoff

Includes or omits line number and file name records from program.

scalerr

Tests for a scalar error code.

trace

Traces program execution for debugging.

trap

Controls trapping of program errors.

trapchk

Examines the trap flag.

warninglog

Prints a warning message to the error window and error log file. The only difference between this and errorlog() is that it will display a warning icon in the error output window.

warninglogat

Prints a warning message to the window and warning log file, along with the file name and line number at which the warning occurred. The only difference between this and errorlogat() is that it will display a warning icon in the error output window

Procedures, keywords and functions#

call

Calls function and discards return values.

dynargsCount

Returns the number of dynamic arguments passed into the current procedure.

dynargsGet

Returns specified dynamic arguments with the option to set default values.

dynargsTypes

Returns a vector containing the types of the dynamic arguments passed into the current procedure.

endp

Terminates a procedure definition.

fn

Allows user to create one-line functions.

keyword

Begins the definition of a keyword procedure. Keywords are user-defined functions with local or global variables.

local

Declares variables local to a procedure.

proc

Begins definition of multi-line procedure.

retp

Returns from a procedure.

User input#

con

Requests console input, creates matrix.

cons

Requests console input, creates string.

key

Gets the next key from the keyboard buffer. If buffer is empty, returns a 0.

keyav

Checks if keystroke is available.

keyw

Gets the next key from the keyboard buffer. If buffer is empty, waits for a key.

Output#

head

Returns the first n rows of a matrix, dataframe or string array.

output

Directs printed output to a file.

print

Prints matrices, arrays, strings and string arrays to the screen and/or auxiliary output.

sprintf

Converts numeric vectors, string vectors and their combinations into formatted strings.

tail

Returns the last n rows of a matrix, dataframe or string array.

General#

compile

Compiles a source file to a compiled code file.

run

Runs a program in a text file.