comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » disable keyword "short forms"
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: disable keyword "short forms" [message #89758 is a reply to message #89756] Mon, 01 December 2014 11:49 Go to previous messageGo to previous message
chris_torrence@NOSPAM is currently offline  chris_torrence@NOSPAM
Messages: 528
Registered: March 2007
Senior Member
On Monday, December 1, 2014 5:27:22 AM UTC-7, superchromix wrote:
> hi,
>
> Is there a compiler option that I can use to turn off the "feature" that allows you to specify a keyword using only the first few characters of the keyword name?
>
> This is an AWFUL feature of IDL.. especially when it comes to object programming.
>
> I have an object, MYOBJ, that inherits IDLgrModel, for example. Now, one of the properties of MYOBJ is "Hidetext". This compiles and runs with no errors.. however, this is a serious bug. When you try to set the HIDE property of MYOBJ, it doesn't work, because IDL thinks you are trying to set "Hidetext" instead.
>
> This "short form keywords" feature is, therefore, a surefire way to generate bugs. Fix please?
>
> thanks
> Mark

Hi Mark,

Well, unfortunately, that decision was made about 30 years ago, at the dawn of IDL. It's probably a holdover from the days when "real programmers" just used variables that were a single character. I can't tell you how many places in IDL's C code where I've discovered a variable "i" that actually points to some huge important C structure.

There's no way to disable this behavior, and it isn't going to change - it's too deeply embedded in the interpreter. Annoying, I know.

There are some "tricks" you can do with _REF_EXTRA to get keywords to work that start with the same characters, but I wouldn't recommend it because it will just confuse people who are actually expecting the goofy behavior.

Sorry,

Chris
ExelisVIS
[Message index]
 
Read Message
Read Message
Read Message
Previous Topic: Re: Problem with ENVI_DOIT, 'CF_DOIT'
Next Topic: Drawing lines in ENVI LiDAR with IDL

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 18:04:31 PDT 2025

Total time taken to generate the page: 0.00318 seconds