Re: Pointer syntax and IDL 4.0: summary [message #28573] |
Fri, 21 December 2001 06:09  |
tam
Messages: 48 Registered: February 2000
|
Member |
|
|
>> 2. Use library routines, like Liam Gumley's, which hide the derefenence
>> in a single function call and hope that V4 users don't explicitly try to
>> compile that function. In Liam's code the Pointer_setgetv5 routine
>> has the dereference syntax. It means that the user has to download
>> at least two separate files.
>>
>
> You misinterpret Liam's library. The POINTER_SETGETV5 procedure is
> *only* called when the user has IDL 5. Thus, in the normal course of
> events, and IDL 4 user can download the file but it will never be
> compiled or used. In the abnormal course of events, the user tries to
> compile the file and it fails, but that doesn't stop the program from
> working, since it will never be invoked.
>
I think that's what I said. Or at least what I meant!
Either the user has to store the function in a separate
file or they'll get a compile time error. They also need to
avoid explicitly compiling the code if it is in a separate file (e.g.,
if creating a save set).
I'll grant that the program will still run after such errors, but I
wouldn't be comfortable distributing
code (or running code I'd received) which gave compile time errors.
One other aspect that I'm curious about is the extent to which this
incompatibility is 'planned'. This kind of incompatibility is in
some ways very much in RSI/Kodak's interest. They could trivially
have provided a functional equivalent of the dereference operator so that
this kind of compile time incompatibility would be easy to avoid.
But they don't want people to stay with IDL4.x.
Perhaps that's a little paranoid -- it's easy to overlook things like this.
Who was it who said: "Never attribute to malice what can be accounted for
by incompetence."?
Regards,
Tom McGlynn
|
|
|