Mikroelektronika MIKROE-442 Datenbogen
![Mikroelektronika](https://files.manualsbrain.com/attachments/e0529b3b58069a916ad7bb89f7e9f5f0eda73421/common/fit/150/50/1b07b99aa3112e022a916b06db07f1f4f211e91d41878452d87c7638b1bf/brand_logo.gif)
mikroBasic PRO for dsPIC30/33 and PIC24
MikroElektronika
189
Punctuators
The mikroBasic PRO for dsPIC30/33 and PIC24 punctuators (also known as separators) are:
- [ ] – Brackets
- ( ) – Parentheses
- , – Comma
- : – Colon
- . – Dot
Brackets
Brackets
[ ]
indicate single and multidimensional array subscripts:
dim alphabet as byte[30]
‘ ...
alphabet[2] = “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
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 identifiers 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)