++ operator not working on array inside a function

More
3 weeks 2 days ago #181 by ludojoey
Hi!

Inside a function, the ++ operator will not work on an array element.

Example:

void f1() {
  byte t[1];
  t[0]=1;
  t[0]++;
  print(t[0]);
}

This will print "1" (wrong)

void f1() {
  byte t[1];
  t[0]=1;
  t[0]=t[0]+1;
  print(t[0]);
}

This will print "2" (right)
 
The following user(s) said Thank You: Franck

Please Log in or Create an account to join the conversation.

More
1 week 3 days ago #209 by Franck
Fixed in 0.7.9
The following user(s) said Thank You: ludojoey

Please Log in or Create an account to join the conversation.

Time to create page: 0.109 seconds
Powered by Kunena Forum