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


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

Re: Weird bug

From "Mayayana" <mayayana@invalid.nospam>
Newsgroups microsoft.public.scripting.vbscript
Subject Re: Weird bug
Date 2015-11-16 21:11 -0500
Organization A noiseless patient Spider
Message-ID <n2e2as$dit$1@dont-email.me> (permalink)
References <n2d78f$639$1@dont-email.me> <n2dgs8$g13$1@dont-email.me> <XnsA554E98BE7E9Ceejj99@194.109.6.166> <n2dnok$dsb$1@dont-email.me> <XnsA555DA5329A1eejj99@194.109.6.166>

Show all headers | View raw


| >   Try this one. It seems to work fine unless there's
| > a multiple If/Then:
| >
| > Dim x, y, z
| >
| > x = 7: y = 6: z = 2: y = z + 5: x = 4
| >
| > MsgBox x
|
| No I won't, there is no If..Then here.
|

  Yes. That's my point. You're talking about a
very sepcific use of colons with If/Then to execute
multiple statements. I'm talking about the other
use of colons -- to serve as line returns in order
to write compact code. The line I wrote above is
a sample. It works perfectly well. Here's another one:

Dim x, y, z

x = 4: y = "apple": z = Instr(y, "l") + 10: x = x + z

MsgBox x

  Those are 4 lines written without carriage returns.
The sample I originally posted was also not a compound
If/Then. It was 3 lines of code, each a complete line
on its own, 2 of which happened to be If/Then
statements.

   I'm only posting this to warn people who may
not be aware of this inconsistency. You may
not use colons as line returns. If not then this
issue will be of no concern to you. But many people
do use colons in that way, and I'm one of them.
Now I know to be on the lookout for complications
in the future. 

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


Thread

Weird bug "Mayayana" <mayayana@invalid.nospam> - 2015-11-16 13:28 -0500
  Re: Weird bug "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2015-11-16 19:50 +0100
  Re: Weird bug "Dave \"Crash\" Dummy" <invalid@invalid.invalid> - 2015-11-16 15:28 -0500
  Re: Weird bug "Mayayana" <mayayana@invalid.nospam> - 2015-11-16 16:13 -0500
    Re: Weird bug "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2015-11-16 22:57 +0100
      Re: Weird bug "Mayayana" <mayayana@invalid.nospam> - 2015-11-16 18:10 -0500
        Re: Weird bug "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2015-11-17 01:20 +0100
          Re: Weird bug "Mayayana" <mayayana@invalid.nospam> - 2015-11-16 21:11 -0500
  Re: Weird bug "R.Wieser" <address@not.available> - 2015-11-17 10:44 +0100
    Re: Weird bug "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2015-11-17 11:19 +0100
      Re: Weird bug "R.Wieser" <address@not.available> - 2015-11-17 11:31 +0100
    Re: Weird bug "Mayayana" <mayayana@invalid.nospam> - 2015-11-17 09:06 -0500
      Re: Weird bug "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2015-11-17 15:24 +0100
        Re: Weird bug "Mayayana" <mayayana@invalid.nospam> - 2015-11-17 10:35 -0500
          Re: Weird bug "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2015-11-17 16:45 +0100
      Re: Weird bug "R.Wieser" <address@not.available> - 2015-11-17 17:13 +0100
        inline "End If" bug, was Re: Weird bug "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2015-11-17 17:41 +0100
          Re: inline "End If" bug, was Re: Weird bug "R.Wieser" <address@not.available> - 2015-11-17 18:27 +0100
            Re: inline "End If" bug, was Re: Weird bug "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2015-11-17 19:37 +0100
              Edsger Wybe Dijkstra was: Re: inline "End If" bug, was Re: Weird bug "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2015-11-17 19:44 +0100
              Re: inline "End If" bug, was Re: Weird bug "R.Wieser" <address@not.available> - 2015-11-17 20:47 +0100
        Re: Weird bug "Mayayana" <mayayana@invalid.nospam> - 2015-11-17 12:01 -0500
          Re: Weird bug "R.Wieser" <address@not.available> - 2015-11-17 18:47 +0100
  Re: Weird bug "R. Roesler" <worm.composter@nospam.arcornews.de> - 2015-11-19 13:12 +0100

csiph-web