So your problem keeps changing?
http://www.picbasic.co.uk/forum/show...s+bytes+arrays
So your problem keeps changing?
http://www.picbasic.co.uk/forum/show...s+bytes+arrays
Last edited by skimask; - 23rd May 2008 at 21:29.
Thank you very much for the answer.
Now I understand!
You are the best!
regards Pesti
hi
Ok I try but I have a Problem!
I have this :
ML_Seconds Var Word [24]
ML_Verz Var Word [24]
Here is wrong too!
Timer_Int:
for M= 0 to 23
ML_Seconds.lowbyte[M] = ML_Seconds.lowbyte[M] + 1
Next M
and now I must to compare this two Words
for N = 0 to 23
If ML_Seconds.lowbyte[N] => ML_Verz.lowbyte[N] Then ...
Next N
But I compare now just the lowest two Bytes,I need the word Data
How I can do that ?!
Thanks
regards Pesti
Not sure what the problem is, but are you sure you don't really want to have:ML_Seconds.lowbyte[M] = ML_Seconds.lowbyte[M] + 1
And this:Code:ML_Seconds.lowbyte[M] = ML_Seconds.lowbyte[ M + 1 ]
Easy enough:for N = 0 to 23
If ML_Seconds.lowbyte[N] => ML_Verz.lowbyte[N] Then ...
Next N
But I compare now just the lowest two Bytes,I need the word Data
Code:temp1 var byte temp2 var byte .................... temp1 = ML_Seconds.lowbyte[N] temp2 = ML_Verz.lowbyte[N] if temp1 => temp2 Then..... Next N
Hi Skimask
thanks
Ok but what is when the value for ML_Seconds.lowbyte[N] is grater then 255 I must to compare the highbyte too!?
How is that are the two bytes in a word connected,i mean that when i increase the value in my ML_Seconds[N] and the value is going out of 255 then increase the highbyte automatically or not?
regards Pesti
Jeeze...then don't limit your inital compare to just the lowbyte...use the whole thing...
Bookmarks