User`s manual

mikroBASIC
- Basic Compiler for Microchip PIC microcontrollers
For example:
dim size as longint[10]
occupies 40 RAM locations (bytes).
program Array_test
dim weights as byte[10]
dim m as byte[13]
dim j as byte[5]
j[0] = m[3] + 6
m[4] = m[2] mod 3
j[2] = not j[0]
if m[0] > 0 then
m[1] = 9
else
m[1] = 90
end if
end.
MikroElektronika:
Development
tools
-
Books
-
Compilers
mikroBASIC
making it simple...
33
page
Example
After you have declared an array,
for example:
dim m [5]as byte
you can easily access its elements
m[0],m[1],m[2]....
m[0]
PIC MCU RAM
Array is just a specified set
of data in memory,
stored in consequent
locations
m[0]
m[0]
m[0]
m[1]
m[0]
m[2]
m[0]
m[3]