Gmail Calendar Documents Reader Web more »
Recently Visited Groups | Help | Sign in
Google Groups Home
Message from discussion Seek Filter Include Example
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Richard Mueller [MVP]  
View profile  
 More options Nov 6 2009, 1:13 am
Newsgroups: microsoft.public.scripting.vbscript
From: "Richard Mueller [MVP]" <rlmueller-nos...@ameritech.nospam.net>
Date: Thu, 5 Nov 2009 19:13:29 -0600
Local: Fri, Nov 6 2009 1:13 am
Subject: Re: Seek Filter Include Example

<gimme_this_gimme_t...@yahoo.com> wrote in message

news:b1cc3104-0a64-41f1-a956-41655ff3af62@y28g2000prd.googlegroups.com...

> 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
--


    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2010 Google