Login   /   Register

Update: A Pitfall for Beginners when Working with a Dictionary

June 24th, 2008 by Meir Bar-Tal
     0 votes, average: 0 out of 50 votes, average: 0 out of 50 votes, average: 0 out of 50 votes, average: 0 out of 50 votes, average: 0 out of 5
Loading ... Loading ...

Dear readers,

I wish to bring to your attention an updated version of a previous article on “A Tip for Beginners when Working with a Dictionary”.

Yours,
Meir

A Pitfall for Beginners when Working with a Dictionary

April 23rd, 2008 by Meir Bar-Tal
     1 votes, average: 5 out of 51 votes, average: 5 out of 51 votes, average: 5 out of 51 votes, average: 5 out of 51 votes, average: 5 out of 5
Loading ... Loading ...

When addressing a non-existing key in a Dictionary object, the add method is invoked by default. The problem is that the Windows Script Host does not inform during runtime that there is a missing key. Moreover, the automatically assigned Empty value may cause trouble to our subsequent code execution.