Thanks.  This work exactly how I needed it to do.  Question, in your example you use:

{a, } = GetMapLayers(, "Point")
{b, } = GetMapLayers(, "Active")

Setting a & b in {} with a coma after it…

What does this do?  How is this different then the following

a = GetMapLayers(, "Point")
b = GetMapLayers(, "Active")

 

Thanks for the help.

 

 

Chandler Coleman

Research & Market Analysis

Albertsons, Inc.

(208) 395-4650

 


From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of Kjartan Stefansson
Sent: Thursday, June 01, 2006 6:58 AM
To: [email protected]
Subject: Re: [Maptitude] taking elements out of an array

 

Chandler,

 

You can loop over one array and remove from it any elements that don't occur in the other one.

 

{a, } = GetMapLayers(, "Point")
{b, } = GetMapLayers(, "Active")
for i = a.length to 1 step -1 do
    if ArrayPosition(b, {a[i]}, ) = 0 then

        // a[i] is not in b so remove it
        a = ExcludeArrayElements(a, i, 1)
end

ShowArray(a)

-Kjartan

 


From: Chandler Coleman [mailto:[EMAIL PROTECTED]]
To: [email protected]
Sent: Wed, 31 May 2006 18:48:26 -0400
Subject: [Maptitude] taking elements out of an array

I have used two functions:
GetMapLayers(, "Point")
GetMapLayers(, "Active")

I now have an array with 43 elements and another with 6. I want to now
compare the two and include only the layers that are in both. However,
I have tried the ExcludeArrayElements() and the InsertArrayElements()
with zero success.

What functions do I use to get a new array with what both these arrays
have in common?
Thanks
Chandler






------------------------ Yahoo! Groups Sponsor --------------------~-->
Everything you need is one click away.  Make Yahoo! your home page now.
http://us.click.yahoo.com/AHchtC/4FxNAA/yQLSAA/C5grlB/TM
--------------------------------------------------------------------~->


Yahoo! Groups Links

<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/Maptitude/

<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/




 

 

 



SPONSORED LINKS
Geographic information systems Geography game Geography


YAHOO! GROUPS LINKS




Reply via email to