Re: Error when using !NULL as a property value. Bug or feature? [message #76438] |
Thu, 02 June 2011 09:12  |
Michael Galloy
Messages: 1114 Registered: April 2006
|
Senior Member |
|
|
On 6/2/11 9:56 AM, Jason Ferrara wrote:
> pro proptest::GetProperty, something=s, empty=e
> s = [1,2,3]
> e = []
> end
>
> PRO proptest__define
> struct={proptest, INHERITS IDL_Object}
> END
Yes, e seems to be loosing its special !null status and becoming just a
normal undefined variable somewhere along the line:
pro proptest::GetProperty, something=s, empty=e
s = [1,2,3]
e = !null
help, e
end
And then:
[334]> p = proptest()
[335]> help, p.empty
E UNDEFINED = !NULL
<Expression> UNDEFINED = <Undefined>
It is OK to return normal undefined variables (like above), but not to
use them in an assignment.
Mike
--
Michael Galloy
www.michaelgalloy.com
Modern IDL, A Guide to Learning IDL: http://modernidl.idldev.com
Research Mathematician
Tech-X Corporation
|
|
|
Re: Error when using !NULL as a property value. Bug or feature? [message #76591 is a reply to message #76438] |
Fri, 10 June 2011 15:47  |
chris_torrence@NOSPAM
Messages: 528 Registered: March 2007
|
Senior Member |
|
|
On Jun 2, 10:12 am, Michael Galloy <mgal...@gmail.com> wrote:
> On 6/2/11 9:56 AM, Jason Ferrara wrote:
>
>> pro proptest::GetProperty, something=s, empty=e
>> s = [1,2,3]
>> e = []
>> end
>
>> PRO proptest__define
>> struct={proptest, INHERITS IDL_Object}
>> END
>
> Yes, e seems to be loosing its special !null status and becoming just a
> normal undefined variable somewhere along the line:
>
This was a bug in IDL 8.1. The fix will be available in the next
version of IDL.
Cheers,
Chris
ITTVIS
|
|
|