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

Home » Public Forums » archive » How to get _overloadSize to return N_Dimensions=0?
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: How to get _overloadSize to return N_Dimensions=0? [message #94355 is a reply to message #88662] Tue, 18 April 2017 06:56 Go to previous messageGo to previous message
Matthew Argall is currently offline  Matthew Argall
Messages: 286
Registered: October 2011
Senior Member
The problem with undefined variables was fixed, but there is another bug related to scalar values. I assume N_Elements is determined as Product(Size(input, /DIMENSIONS)). However, a scalar value has a dimension size of 0, so the result of 0 elements.


function test_olSize::_OverloadSize
return, size(*self.value, /DIMENSIONS)
end

function test_olSize::Init, value
compile_opt strictarr
self.value = Ptr_New(value, /NO_COPY)
return, 1
end

pro test_olSize__define
class = {test_olSize, $
inherits IDL_Object, $
value: ptr_new()}
end


IDL> myObj = Obj_New('Test_olSize', 1)
IDL> Print, N_Elements(myObj)
0
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: constant time cadence
Next Topic: alignment of y-axis tick labels

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

Current Time: Wed Oct 08 13:46:44 PDT 2025

Total time taken to generate the page: 0.00733 seconds