User manual
mikroBasic PRO for PIC32
MikroElektronika
187
Parentheses
Parentheses ( ) are used to group expressions, isolate conditional expressions, and indicate function calls and
function parameters:
d = c * (a + b) ‘ Override normal precedence
if (d = z) then ... ‘ Useful with conditional statements
func() ‘ Function call, no arguments
sub function func2(dim n as word) ‘ Function declaration w/ parameters
For more information, refer to Operators Precedence and Associativity, Expressions and Functions and Procedures.
Comma
Comma (,) separates the arguments in function calls:
Lcd_Out(1, 1, txt)
Furthermore, the comma separates identiers in declarations:
dim i, j, k as word
The comma also separates elements in initialization lists of constant arrays:
const MONTHS as byte[12] = (31,28,31,30,31,30,31,31,30,31,30,31)
Colon
Colon (:) is used to indicate a labeled statement:
start: nop
‘...
goto start
For more information, refer to Labels.
Dot
Dot (.) indicates access to a structure member. For example:
person.surname = “Smith”
For more information, refer to Structures.
Dot is a necessary part of oating point literals. Also, dot can be used for accessing individual bits of registers in
mikroBasic PRO for PIC32.