Data Sheet

MicroBasic Language Reference
Advanced Digital Motor Controller User Manual 199
condition is any expression returning a boolean result.
stmt is single Micro Basic statement.
block is zero or more Micro Basic statements.
label is any valid label name.
n is a positive integer value.
str is a valid string literal.
Keywords
A keyword is a word that has special meaning in a language construct. All keywords are
reserved by the language and may not be used as variables or label names. Below is a list
of all Micro Basic keywords:
#define And AndWhile As Boolean
Continue Dim Do Else ElseIf
End Evaluate Exit Explicit False
For GoSub GoTo If Integer
Loop Mod Next Not Option
Or Print Return Step Terminate
Then To ToBool Tru e Until
While XOr
Operators
Micro Basic provides a large set of operators, which are symbols or keywords that specify
which operations to perform in an expression. Micro Basic predefines the usual arithmetic
and logical operators, as well as a variety of others as shown in the following table.
Category Operators
Arithmetic
+ - * / Mod
Logical (boolean and bitwise)
And Or XOr Not True False
Increment, decrement
++ --
Shift
<< >>
Relational
= <> < > <= >=
Assignment
= += -= *= /= <<= >>=
Indexing
[]
Micro Basic Functions
The following is a set of Micro Basic functions
Abs Returns the absolute value of a given number.
Atan Returns the angle whose arc tangent is the specified number.
Cos Returns the cosine of the specified angle.
Sin Returns the sine of the specified angle.
Sqrt Returns the square root of a specified number.