Windows Vista Forums
Vista Forums Home Join Vista Forums Windows 7 Forum Vista Tutorials Tags
Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks.

Go Back   Vista Forums > Misc Newsgroups > VB Script

Vista - Seek Filter Include Example

Reply
 
Old 2 Weeks Ago   #1 (permalink)
gimme_this_gimme_that


 
 

Seek Filter Include Example

This creates an Array M and fetches the elements having cc - so it
displays dccr....


M= Split("bbadccraddaeea","a")
B = Filter(M,"cc")
WScript.Echo Join(B,",")

Filter also has this syntax:

Filter(Array,Search[,Include[,Mode]])

Can someone create an example based on these variables that utilizes
Include?



My System SpecsSystem Spec
Old 2 Weeks Ago   #2 (permalink)
Richard Mueller [MVP]


 
 

Re: Seek Filter Include Example


<gimme_this_gimme_that@newsgroup> wrote in message
news:b1cc3104-0a64-41f1-a956-41655ff3af62@newsgroup
Quote:

> This creates an Array M and fetches the elements having cc - so it
> displays dccr....
>
>
> M= Split("bbadccraddaeea","a")
> B = Filter(M,"cc")
> WScript.Echo Join(B,",")
>
> Filter also has this syntax:
>
> Filter(Array,Search[,Include[,Mode]])
>
> Can someone create an example based on these variables that utilizes
> Include?
>
>
The Include parameter is a boolean. True (the default), means the new array
will only contain elements of the original that include the Search pattern.
False means the array will contain elements that do not include the Search
pattern. For example, this code:
===============
Option Explicit
Dim M, B, C, D

M = Split("bbadccraddaeea", "a")
Wscript.Echo Join(M, ",")
Wscript.Echo "..."

B = Filter(M, "cc", True)
Wscript.Echo Join(B, ",")
Wscript.Echo "..."

C = Filter(M, "cc", False)
Wscript.Echo Join(C, ",")
Wscript.Echo "..."

D = Filter(M, "cc")
Wscript.Echo Join(D, ",")
========
Results in the following:

bb,dccr,dd,ee,
....
dccr
....
bb,dd,ee,
....
dccr

My reference that describes this function states that the default for
Include is False, but the example above shows this to not be the case. The
default seems to be True.

--
Richard Mueller
MVP Directory Services
Hilltop Lab - http://www.rlmueller.net
--


My System SpecsSystem Spec
Old 2 Weeks Ago   #3 (permalink)
gimme_this_gimme_that


 
 

Re: Seek Filter Include Example

So Include is a boolean?
My System SpecsSystem Spec
Old 2 Weeks Ago   #4 (permalink)
Richard Mueller [MVP]


 
 

Re: Seek Filter Include Example


<gimme_this_gimme_that@newsgroup> wrote in message
news:35f2da1d-c9ea-414b-a333-786f3a9ce3e3@newsgroup
Quote:

> So Include is a boolean?
Yes.

--
Richard Mueller
MVP Directory Services
Hilltop Lab - http://www.rlmueller.net
--


My System SpecsSystem Spec
Reply

Thread Tools


Similar Threads
Thread Forum
Hide N' Go Seek HDD Vista hardware & devices
Please advise where to seek help? Vista General
When using System.IO.FileStream, I write 8 bytes, then seek to the start of the file, does the 8 bytes get flushed on seek and the buffer become a readbuffer at that point instead of being a write buffer? .NET General
Media Center: Where are the seek bar? Vista music pictures video
help. Digital filter? how to de-filter? USB audio device Vista hardware & devices


Vista Forums is an independent web site and has not been authorized,
sponsored, or otherwise approved by Microsoft Corporation.
"Windows Vista", the Start Orb, and related materials are trademarks of Microsoft Corp.
© Designer Media Ltd

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46