Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > microsoft.public.scripting.vbscript > #12089

Re: Dictionary oddity (was: CreateShortcut on cmd.exe - how to set fullscreen mode ? (not WindowStyle))

From "Mayayana" <mayayana@invalid.nospam>
Newsgroups microsoft.public.scripting.vbscript
Subject Re: Dictionary oddity (was: CreateShortcut on cmd.exe - how to set fullscreen mode ? (not WindowStyle))
Date 2019-04-20 12:22 -0400
Organization A noiseless patient Spider
Message-ID <q9fh34$h7m$1@dont-email.me> (permalink)
References (3 earlier) <ix0f8eayditt$.nynhug80474v.dlg@40tude.net> <q99737$1l9v$1@gioia.aioe.org> <1760mnafxodj7$.1sxig0kye2772.dlg@40tude.net> <q9boet$12c9$1@gioia.aioe.org> <1dvew6dhwc99d$.8yr2jbwh5vsg.dlg@40tude.net>

Show all headers | View raw


"JJ" <jj4public@vfemail.net> wrote

| > Did you know that when you ask a dictionary object for the data of a
| > non-existing key it will add that key (without data) ?    Funny when you 
see
| > such a dictionary grow when all you have been doing is querying it ...
|
| I rarely use dictionary, but it does work uncommonly. Even though MSDN
| mentioned it clearly that it will create the key if it doesn't yet exist, 
it
| will surely caught some experienced programmers by surprise.
|

  I've never noticed that problem. Why would anyone check
the value of a key without knowing it exists? There is an
Exists method, but even that shouldn't normally be necessary.

| I wonder if this behaviour is the same for VBA's built in dictionary 
object,
| if such thing exist.

  The VB Dictionary is coming from scrrun.dll. I love Dictionaries.
The author of the O'Reilly VB book pointed out that they're much
faster than Collections, which I rarely use. But I stick to VBS for
Dictionary use because the scrrun dependency in VB can be a
problem and it's not designed for native code efficiency. Really,
saying that VB has FileSystemObject and Dictionary is just a
sleight of hand. VB doesn't have those. It's just able to use
scrrun and a lot of people decided to pretend VB and VBS are
the same thing.

  When I want something similar in VB I write classes that store
arrays. But in VBS I find Dictionaries a great way to store loads
of complexly related data. 

Back to microsoft.public.scripting.vbscript | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

CreateShortcut on cmd.exe - how to set fullscreen mode ? (not WindowStyle) "R.Wieser" <address@not.available> - 2019-04-16 10:22 +0200
  Re: CreateShortcut on cmd.exe - how to set fullscreen mode ? (not WindowStyle) "Mayayana" <mayayana@invalid.nospam> - 2019-04-16 08:22 -0400
    Re: CreateShortcut on cmd.exe - how to set fullscreen mode ? (not WindowStyle) "R.Wieser" <address@not.available> - 2019-04-16 14:53 +0200
      Re: CreateShortcut on cmd.exe - how to set fullscreen mode ? (not WindowStyle) "Mayayana" <mayayana@invalid.nospam> - 2019-04-16 09:11 -0400
        Re: CreateShortcut on cmd.exe - how to set fullscreen mode ? (not WindowStyle) "R.Wieser" <address@not.available> - 2019-04-16 17:43 +0200
  Re: CreateShortcut on cmd.exe - how to set fullscreen mode ? (not WindowStyle) JJ <jj4public@vfemail.net> - 2019-04-17 13:29 +0700
    Re: CreateShortcut on cmd.exe - how to set fullscreen mode ? (not WindowStyle) "R.Wieser" <address@not.available> - 2019-04-17 10:35 +0200
      Re: CreateShortcut on cmd.exe - how to set fullscreen mode ? (not WindowStyle) JJ <jj4public@vfemail.net> - 2019-04-18 09:24 +0700
        Re: CreateShortcut on cmd.exe - how to set fullscreen mode ? (not WindowStyle) "R.Wieser" <address@not.available> - 2019-04-18 08:56 +0200
          Re: CreateShortcut on cmd.exe - how to set fullscreen mode ? (not WindowStyle) "Mayayana" <mayayana@invalid.nospam> - 2019-04-18 08:35 -0400
            Re: CreateShortcut on cmd.exe - how to set fullscreen mode ? (not WindowStyle) "Mayayana" <mayayana@invalid.nospam> - 2019-04-18 10:25 -0400
            Re: CreateShortcut on cmd.exe - how to set fullscreen mode ? (not WindowStyle) "R.Wieser" <address@not.available> - 2019-04-18 18:50 +0200
          Re: CreateShortcut on cmd.exe - how to set fullscreen mode ? (not WindowStyle) JJ <jj4public@vfemail.net> - 2019-04-19 12:32 +0700
            Re: CreateShortcut on cmd.exe - how to set fullscreen mode ? (not WindowStyle) "R.Wieser" <address@not.available> - 2019-04-19 08:04 +0200
              Dictionary oddity (was: CreateShortcut on cmd.exe - how to set fullscreen mode ? (not WindowStyle)) JJ <jj4public@vfemail.net> - 2019-04-20 22:37 +0700
                Re: Dictionary oddity (was: CreateShortcut on cmd.exe - how to set fullscreen mode ? (not WindowStyle)) "Mayayana" <mayayana@invalid.nospam> - 2019-04-20 12:22 -0400
                Re: Dictionary oddity (was: CreateShortcut on cmd.exe - how to set fullscreen mode ? (not WindowStyle)) "R.Wieser" <address@not.available> - 2019-04-20 20:02 +0200
                Re: Dictionary oddity JJ <jj4public@vfemail.net> - 2019-04-21 18:33 +0700
                Re: Dictionary oddity (was: CreateShortcut on cmd.exe - how to set fullscreen mode ? (not WindowStyle)) "R.Wieser" <address@not.available> - 2019-04-20 19:34 +0200
                Re: Dictionary oddity JJ <jj4public@vfemail.net> - 2019-04-21 18:55 +0700
                Re: Dictionary oddity "R.Wieser" <address@not.available> - 2019-04-21 15:13 +0200

csiph-web