Path: csiph.com!eternal-september.org!feeder.eternal-september.org!aioe.org!.POSTED!not-for-mail From: "R.Wieser" Newsgroups: microsoft.public.scripting.vbscript Subject: Re: Weird bug Date: Tue, 17 Nov 2015 18:47:24 +0100 Organization: Aioe.org NNTP Server Lines: 44 Message-ID: References: NNTP-Posting-Host: XSLsI1Jcl7NultOj/0AyIg.user.speranza.aioe.org X-Complaints-To: abuse@aioe.org X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2615.200 X-Notice: Filtered by postfilter v. 0.8.2 X-Newsreader: Microsoft Outlook Express 5.00.2615.200 X-Priority: 3 X-MSMail-Priority: Normal Xref: csiph.com microsoft.public.scripting.vbscript:11200 Mayayana, > Try my sample without the colons: [snip] > It won't work. You have not used *either* of the available methods to end a command/equation and are complaining that it won't work ? Really ? :-D And no, that you can either use a colon or a line-break between the "True" and "Set" still does not mean they are the same (as I already tried to explain). Regards, Rudy Wieser. -- Origional message: Mayayana schreef in berichtnieuws n2fmfs$k1a$1@dont-email.me... > | > A colon acts as a line break. > | > | Nope, it does not. > > Try my sample without the colons: > > Dim FSO Set FSO = CreateObject("Scripting.FileSystemObject") FSO.DeleteFile > "C:\windows\desktop\test.txt", True Set FSO = Nothing > > It won't work. You'll get an error "Expected end of statement" > before Set. That doesn't happen with the colons. I don't > see why this should be so hard to explain. If/Then can have > multiple actions assigned using colons. Colons are *also* > valid carriage return characters. They're two entirely different > functions. The problem comes when one of those lines > contains If/Then, even if the syntax does not indicate > multiple statements for execution. In that case it *should* > be treated the same as if the code was on separate lines, > but it isn't. > >