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


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

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

From "R.Wieser" <address@not.available>
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 20:02 +0200
Organization Aioe.org NNTP Server
Message-ID <q9fmsm$j30$2@gioia.aioe.org> (permalink)
References (4 earlier) <q99737$1l9v$1@gioia.aioe.org> <1760mnafxodj7$.1sxig0kye2772.dlg@40tude.net> <q9boet$12c9$1@gioia.aioe.org> <1dvew6dhwc99d$.8yr2jbwh5vsg.dlg@40tude.net> <q9fh34$h7m$1@dont-email.me>

Show all headers | View raw


Mayayana,

> Why would anyone check the value of a key without
> knowing it exists?

Because its a two-in-one step: if the result is not-empty I use it, if not I 
know I need to do something in relation with the key, store the result and 
use it.  In short, a cache.

But thats something else thats rather odd: The dictionary doesn't throw an 
error when the key doesn't exist. Instead it returns a null.   I know that 
it does away with having to use "exists" beforehand, but whats the logic in 
that ?

In short, what where the people thinking when they purposely wrote the 
method that way ?

> There is an Exists method, but even that shouldn't normally
> be necessary.

:-) How than do you know whats (already) in there ?    Normally I do not 
exactly know what the file contains my code is trawling thru, and certainly 
will not gamble on those contents being perfect.

>  When I want something similar in VB I write classes that
> store arrays.

Static arrays are very costly when you want to add a record.   Mind you, 
I've used VBScript on a 256 MByte (yes, Mega) Win98 machine.    It payed off 
to be a bit carefull with what you did memore wise.

Regards,
Rudy Wieser 

Back to microsoft.public.scripting.vbscript | Previous | Next — Previous 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