User manual
mikroPascal PRO for PIC32
MikroElektronika
185
Punctuators
The mikroPascal PRO for PIC32 punctuators (also known as separators) are:
[ ] – Brackets
( ) – Parentheses
, – Comma
; – Semicolon
: – Colon
. – Dot
Brackets
Brackets [ ] indicate single and multidimensional array subscripts:
var alphabet : array[1..30] of byte;
// ...
alphabet[3] := 'c';
For more information, refer to Arrays.
Parentheses
Parentheses ( ) are used to group expressions, isolate conditional expressions and indicate function calls and function
declarations:
d := c * (a + b); // Override normal precedence
if (d = z) then ... // Useful with conditional statements
func(); // Function call, no arguments
function func2(n : word); // Function declaration with 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:
var i, j, k : byte;
The comma also separates elements of array in initialization lists:
const MONTHS : array[1..12] of byte = (31,28,31,30,31,30,31,31,30,31,30,31);