PDA

View Full Version : Dynamic array??



lerameur
- 18th November 2010, 18:53
Hello,

I will explain what I need and maybe what I am looking is not dynamic array (like c++)
I have a counter which lets say might go up to 22 for example. On every one of those 22 count I need to keep a value, say voltage.

Its easyto build up count (which starts at 0): count = count + 1
Now what I want to do is voltage.count = voltage
therefore I need to keep 22 voltage value in memory.

thanks
K

lerameur
- 18th November 2010, 19:13
ooo I think I found it .. manual are helpful:
Voltage_Array var bit[250]
then
Voltage_Array [counter here]

mackrackit
- 18th November 2010, 19:15
This may also help
http://www.picbasic.co.uk/forum/content.php?r=92-Bits-Bytes-Words-and-Arrays

lerameur
- 18th November 2010, 22:16
Ok,
Now i am getting into my real programming. I want to keep a date and time in memory from the following command :
I2CREAD SDA,SCL,$D1,$00,[STR DB0\8]

so is the link you supplied me the best way to keep this time in memorry array ? I basically would need 2 array into one ...