MATLAB Answers

Variable highlighting sometimes doesn't work (Editor)

25 views (last 30 days)
z8080
z8080 on 8 Mar 2017
Answered: z8080 on 9 Mar 2017
With some variables, clicking on them in the Editor does not highlight other occurrences of that same variable within the current script, as would be expected.
Not sure why that is the case, since those variables are no different from those for which highlighting works normally; and there are no syntax errors in my script. Any ideas? Using R2016a.

  3 Comments

Adam
Adam on 8 Mar 2017
The only time I have really observed this to happen is when I have syntax errors or am in the middle of writing a function or line of code (which is basically the same thing since the half-finished line is a syntax error).
z8080
z8080 on 9 Mar 2017
That's what I suspected as well, but as I said I have no unfinished code or syntax errors!..
z8080
z8080 on 9 Mar 2017
Actually, I think it was caused by a return command I had in my script somewhere, that made some lines non-reachable - so still in the same vein. Thanks again!

Sign in to comment.

Accepted Answer

z8080
z8080 on 9 Mar 2017
caused by a return command I had in my script somewhere, that made some lines non-reachable

  0 Comments

Sign in to comment.

More Answers (0)

Sign in to answer this question.

Tags