AKD BASIC User Guide | 4 Quick Reference: Parameters, Functions, Operators
Parameter Type Description
Call Statement Transfer program control to a subroutine. When the sub-
routine is finished then control is transferred to the line fol-
lowing the CALL.
Cls Statement This statement transmits 40 line feed characters (ASCII
code = 10) to the serial port. Cls clears the display of a ter-
minal.
Const Statement Declares symbolic constants to be used instead of numeric
values.
Dim Statement Used for declaring variables before use. All variables
(except predefined variables) must be declared before they
can be used.
Exit Statement The Exit statement is used to exit from a subroutine, a func-
tion, an interrupt, a For...Next or a While...Wend.
For...Next Statement Allows a series of lines to be executed in a loop a specified
number of times.
Function Statement The Function statement is used to declare and define the
name, arguments and type of a user defined function.
GoTo Statement GOTO causes the software to jump to the specified label
and continue executing from there.
If...Then...Else Statement If...Then...Else statements controls program execution
based on the evaluation of numeric or string expressions.
Input Statement The Input statement reads a character string received from
the console tab screen below the program editor window,
terminated by a carriage-return.
On Error GoTo Statement On Error Goto allows you to define a run-time error handler
to prevent run-time errors from halting program execution.
Pause() Statement Causes the program execution to pause for a specified
amount of time. The motion of the motor is not affected.
Print Statement Displays formatted output through the console while the
program is running.
Restart Statement Causes program execution to begin again from the begin-
ning of the program.
Select Case Statement Select Case executes one of several statement blocks
depending upon the value of an expression.
Static Statement Static
Stop Statement Stops execution of the user program.
Sub...End Sub Statement The Sub statement declares a sub procedure and defines
the sub procedures format.
Swap Statement Exchanges the value of two variables.
While...Wend Statement Executes a series of lines for as long as the condition after
the WHILE is True.
BASICOperators
MOD Operator This is the modulus or "remainder" operator. It divides one
number by another and returns the remainder.
BASICFunctions
ABS() Function ABS(x) converts the associated value (x) to an absolute
value. If the value is negative, it is converted to a positive
value. If the value is positive, it is not changed.
Kollmorgenâ„¢ | March 30, 2012 56