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

Home » Public Forums » archive » Re: LIST "bug": .Remove on an empty list
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: LIST "bug": .Remove on an empty list [message #74046 is a reply to message #73999] Wed, 15 December 2010 14:46 Go to previous messageGo to previous message
chris_torrence@NOSPAM is currently offline  chris_torrence@NOSPAM
Messages: 528
Registered: March 2007
Senior Member
On Dec 13, 8:18 pm, Paulo Penteado <pp.pente...@gmail.com> wrote:
>
> Besides the bad error message for list::remove(), I would say that the
> bug is in hash::remove(). Unless I am missing something, it should
> throw an error on an empty hash. Returning !null with no errors makes
> the empty list/hash look like it has elements (which happen to have !
> null as a value).
>

Hi Paulo,

I would agree. I'm going to change both the List::Remove() and
Hash::Remove() *functions* to throw an error if the list/hash is
empty. The List and Hash::Remove *procedures* will just quietly return
(no need to throw an error), unless you actually specify an index (or
key) in which case it will throw an error.

I'll also try to add an IsEmpty() method for IDL 8.1.

Cheers,
Chris
ITTVIS
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: LIST performance
Next Topic: LIST "bug": .Remove on an empty list

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

Current Time: Fri Oct 10 02:48:57 PDT 2025

Total time taken to generate the page: 0.88068 seconds