How to get a different color for a non existing variable ?

APL-related discussions - a stream of APL consciousness.
Not sure where to start a discussion ? Here's the place to be
Forum rules
This forum is for discussing APL-related issues. If you think that the subject is off-topic, then the Chat forum is probably a better place for your thoughts !
Post Reply
User avatar
PGilbert
Posts: 440
Joined: Sun Dec 13, 2009 8:46 pm
Location: Montréal, Québec, Canada

How to get a different color for a non existing variable ?

Post by PGilbert »

While typing the name of a global variable that does not exist (because it is misspelled or nonexisting) in a function, is it possible to change the color of that variable name to another color so we know that it is misspelled or nonexisting?

I see in the color scheme that there is the color for a global variable but what about a global variable that does not exist? Exist or does not exist seems to be the same color.

Thanks in advance.
User avatar
Phil Last
Posts: 628
Joined: Thu Jun 18, 2009 6:29 pm
Location: Wessex

Re: How to get a different color for a non existing variable

Post by Phil Last »

Only a guess but it seems most likely that the designer has chosen to lump everything not locally defined or a global function, operator or script together and decided to call them "global variable" rather than "undefined". A matter of taste. If a new type were defined without extending the list being consulted by autocomplete it would probably fall into the same catchall.
User avatar
PGilbert
Posts: 440
Joined: Sun Dec 13, 2009 8:46 pm
Location: Montréal, Québec, Canada

Re: How to get a different color for a non existing variable

Post by PGilbert »

Thanks Phil for your thoughts. Coming from APL2000 I miss that feature that we had, it is useful when you look at an already written function and the global variable name does not exist anymore, you can catch it right away. The programmer is more productive with such a feature.

Hopefully, we will have it one day with Dyalog also.
Vince|Dyalog
Posts: 439
Joined: Wed Oct 01, 2008 9:39 am

Re: How to get a different color for a non existing variable

Post by Vince|Dyalog »

Hi Pierre,

I have logged your request as RFE 19207.

Regards,

Vince
User avatar
PGilbert
Posts: 440
Joined: Sun Dec 13, 2009 8:46 pm
Location: Montréal, Québec, Canada

Re: How to get a different color for a non existing variable

Post by PGilbert »

Many thanks Vince.
ArrayMacNB
Posts: 9
Joined: Tue Sep 01, 2020 3:03 pm

Re: How to get a different color for a non existing variable

Post by ArrayMacNB »

This color would save the need to glance down at the 'CurObj:' line at the bottom, yes. Given it does not seem to be a big effort to glance down, I am not sure that the savings justify an interpreter change. YMMV (or VMPV?), of course.
User avatar
kai
Posts: 141
Joined: Thu Jun 18, 2009 5:10 pm
Location: Hillesheim / Germany

Re: How to get a different color for a non existing variable

Post by kai »

This is about spotting anything undefined with a single glance no matter how many variables there are. CurObj does not help then.

I am strongly in favour of this feature request.
Post Reply