Closed knupel closed 10 years ago
No, the variable basically remains unused. It's a local variable and since you're assigning it a value at the return statement(last line), it's not really being put to any actual use.
You can disable warning from the PDE X menu.
If I don't want this warning, I must write before the return, c = blablabla ; return c ; if I understand what you mean. But my way work so is not so bizarre. And my c is us by the return, may it's good to add "return" in the list of function use the var ? I don't know if i'm clear ?
plus, I have a same family information about the var with no Effect, but I know there is effect :
may it's good to add "return" in the list of function use the var
I'm afraid adding return to the list of allowed uses would be a bad design choice. You can simply return whatever value you need without storing them in unused local variables.
The 2nd warning you're getting is for else newPos = newPos;
. It is unnecessary code and can be omitted.
1/ interesting I don't know we can use "return" like a variable !!!
2/ I don't understand why newPos has no affect, now I understand better. It was not the first part of the line, but the second. In my case the problem is after the else, we can imagine PDEX underline just under the problem not all the sentence? make sens ?
we can imagine PDEX underline just under the problem not all the sentence
It is something that I always wanted to achieve, but it's technically a challenge. I've only been able to narrow down errors according to line numbers. Locating the error precisely on the line introduces much more complications. I wasn't able to implement it earlier. It'd be great if someone can help with this.
I'm closing this issue now.
The console return this message" the value of the local variable c is not used" it's strange because this var is used to return information, isn't it ? to illustrated my word, look the sreenshot![capture decran 2013-12-02 a 12 53 10](https://f.cloud.github.com/assets/3332269/1654301/c3e1d79a-5b48-11e3-9e44-97e239c7fe85.png)