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

Home » Public Forums » archive » Empty arrays?
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Empty arrays? [message #63439] Mon, 10 November 2008 14:07 Go to previous message
Anonymous
Originally posted by: Demitri

Hello,

I'm starting to dig into IDL programming, and one thing I've found
particularly annoying is the lack of support for empty arrays. Although
I'm using IDL's OO capabilities, I find that I'm spending a lot of time
testing for return results where an empty array would be much more
suitable.

If I'm building an array that will have zero or more entries, I create
a variable, "insert" a dummy value, go through the code adding entries
based on whatever logic, then pop the top dummy value. But even then I
have to check that more than one entry is there so I dont throw an
error with a

return, a[1:*]

This is very basic functionality. Does anyone have a particularly
elegant... well, I'd say solution, but anything is obviously a
workaround. I don't want to fight the language, but I get the feeling
that IDL's philosophy is "yeah, you do it yourself. I can't be
bothered."

Cheers,

Demitri
[Message index]
 
Read Message
Read Message
Read Message
Previous Topic: Quaternion spherical interpolation in PV-Wave
Next Topic: map_image edge distortion

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

Current Time: Sat Oct 11 10:21:44 PDT 2025

Total time taken to generate the page: 0.64001 seconds