Forums before death by AOL, social media and spammers... "We can't have nice things"
|    alt.comp.os.windows-xp    |    Actually wasn't too bad for a M$-OS    |    17,273 messages    |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
|    Message 17,071 of 17,273    |
|    Mr. Man-wai Chang to R.Wieser    |
|    Re: VBScript dictionary delete by index     |
|    06 Nov 25 22:12:31    |
      XPost: alt.comp.lang.vbscript, alt.windows7.general       From: toylet.toylet@gmail.com              On 6/11/2025 10:03 pm, R.Wieser wrote:        >        > I've got a vbscript Dictionary object, and need to be able to delete a        > key-item pair by its index. Can it be done and if so, how is        > it expressed ?        >        > Remark: I can use        >        > oDict.remove oDict.keys()(Index)        >       > Just now I realized that I took it for granted that I can't "for each" a       > dictionary in a reverse order (the reason for the reverse order is because I       > want to delete items)       >       > So, I'm asking now : is it possible to do a "for each key in oDict" from the       > last to first item ?       >       > I just googeled for it and didn't find anything, but that doesn't say       > everything.       >                     If you can use array index to access oDict, you first count the number       of items in oDict, then use a for loop from number of items back to 1.              --        @~@ Simplicity is Beauty! Remain silent! Drink, Blink, Stretch!        / v \ May the Force and farces be with you! Live long and prosper!!       /( _ )\ https://sites.google.com/site/changmw/        ^ ^ https://github.com/changmw/changmw              --- SoupGate-Win32 v1.05        * Origin: you cannot sedate... all the things you hate (1:229/2)    |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
(c) 1994, bbs@darkrealms.ca