Problem with highlighting words

Post bugs related to the IDE here
davido
Addict
Addict
Posts: 1890
Joined: Fri Nov 09, 2012 11:04 pm
Location: Uttoxeter, UK

Problem with highlighting words

Post by davido »

In the code below the word Variable is Defined in line 1 and also occurs in lines 3,4 & 5.

If you double-click on Variable in line 1 it is highlighted and so are all the those in lines 4 & 5.
Note that those in line 3 are not highlighted.

Code: Select all

Define Variable.i, NewVariable.i

NewVariable + Variable*Variable
NewVariable+ Variable+Variable
NewVariable + Variable
I appreciate that this is a very minor problem.
DE AA EB
User avatar
Tenaja
Addict
Addict
Posts: 1959
Joined: Tue Nov 09, 2010 10:15 pm

Re: Problem with highlighting words

Post by Tenaja »

This issue is also in the Win64 version.

It likely has to do with the asterisk being treated as a character, because it can be part of a pointer variable name. The simple workaround is to use spaces around asterisks.

Since both "variable" and "*variable" are valid keywords, this is one of those exceptional parsing situations that requires its own code (either lots of tests, or making the asterisk have its own character class), and is probably why the issue exists, and also why fixing it is likely to stay low on the priority list.
Post Reply