Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > microsoft.public.scripting.vbscript > #11928
| Path | csiph.com!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail |
|---|---|
| From | "Roger Roesler" <worm.composter@nospam.arcornews.de> |
| Newsgroups | microsoft.public.scripting.vbscript |
| Subject | Re: Variable type questions |
| Date | Sun, 29 Apr 2018 19:54:16 +0200 |
| Organization | No Such Agency |
| Lines | 25 |
| Message-ID | <fkmfa6F7spdU1@mid.individual.net> (permalink) |
| References | <swdf41oi1p7r$.1s7t32djqg8xd.dlg@40tude.net> <fkli1dF1gifU1@mid.individual.net> <1u87muxsbkmpk.1znphd68dbaj$.dlg@40tude.net> |
| Reply-To | "Roger Roesler" <h.roger.roesler@gmail.com> |
| Mime-Version | 1.0 |
| Content-Type | text/plain; format=flowed; charset="UTF-8"; reply-type=original |
| Content-Transfer-Encoding | 8bit |
| X-Trace | individual.net StyHPyWYb/TI02YqbMWPygfUPFVTrHQheBM9dV5JzT/eu1mT0C |
| Cancel-Lock | sha1:sf2u9G5jXgduK7DoyG9i7+wIcq4= |
| X-Priority | 3 |
| X-MSMail-Priority | Normal |
| X-Newsreader | Microsoft Outlook Express 6.00.2900.5931 |
| X-MimeOLE | Produced By Microsoft MimeOLE V6.00.2900.7264 |
| Xref | csiph.com microsoft.public.scripting.vbscript:11928 |
Show key headers only | View raw
JJ <jj4public@vfemail.net> typed: >> The result is somewhat unexpected. HTH > > You shouldn't apply bitwise operator on variable types because > variable type values mostly are not bit masks (except vbArray). > > In that code, vbError is 10, and vbObject is 9. AND-ing them would > result to 8, where if it's converted to boolean, it will be true. > Because numbers which isn't zero, will always evaluate to true if > it's converted to boolean. > > So, instead of: > > CBool(VarType(Err) And vbError) > > It should be: > > ((VarType(Err) And &HFFF) = vbError) Ok, thanks! -- ЯR
Back to microsoft.public.scripting.vbscript | Previous | Next — Previous in thread | Find similar | Unroll thread
Variable type questions JJ <jj4public@vfemail.net> - 2018-04-27 02:16 +0700
Re: Variable type questions "Mayayana" <mayayana@invalid.nospam> - 2018-04-26 17:17 -0400
Re: Variable type questions JJ <jj4public@vfemail.net> - 2018-04-28 02:44 +0700
Re: Variable type questions "R.Wieser" <address@not.available> - 2018-04-27 09:38 +0200
Re: Variable type questions JJ <jj4public@vfemail.net> - 2018-04-28 02:56 +0700
Re: Variable type questions "Roger Roesler" <worm.composter@nospam.arcornews.de> - 2018-04-29 11:35 +0200
Re: Variable type questions JJ <jj4public@vfemail.net> - 2018-04-29 22:51 +0700
Re: Variable type questions "Roger Roesler" <worm.composter@nospam.arcornews.de> - 2018-04-29 19:54 +0200
csiph-web