I kind of was thinking that but I tried the => it didn't work too. I'm going to test for less
thanks this c stuff is not that easy i looked up for loops nothing in xc8 about going less
lust ++ lol
Yep the 0 test don't seem to work and the arduino type test don't work with xc8 no errors just don't do nothing.
>= didn't work Im going to try it your way mike thanks
#include <stdio.h>
#include <stdint.h>
int main(){
uint16_t i,j;
for (i = 0x03FF; i != 0xffff; i--){
j=i;
}
printf("Value of i is %d (0x%x) and j is %d (0x%x)",i,i,j,j);
return 0;
}
Because the test (i!=0xffff) is done after the decrement the value of J is zero and i is 0xffff.
You can set breakpoints at various points and see whats happening.
Happy playing.
Mike thats a great site I been looking for just a way to do that writing files and testing with C on linux works but that is easy put code and see what happens cool Thinks Mike