This repository was archived by the owner on Aug 31, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 223
Expand file tree
/
Copy pathintersect.xml
More file actions
60 lines (46 loc) · 3.14 KB
/
Copy pathintersect.xml
File metadata and controls
60 lines (46 loc) · 3.14 KB
1
<doc> <legacy_id>2350</legacy_id> <name>intersect</name> <type>command</type> <syntax> <example>intersect <i>array</i> with <i>templateArray</i> [recursively]</example> </syntax> <synonyms> </synonyms> <summary>Removes <glossary tag="element">elements</glossary> from an <glossary tag="array">array</glossary> if they have no corresponding <keyword tag="element">element</keyword> in another <glossary tag="array">array</glossary>.</summary> <examples><example><p>put "green" into tArray1["color"]</p><p>put "left" into tArray1["align"]</p><p></p><p>put "blue" into tArray2["color"]</p><p>put "100" into tArray2["width"]</p><p></p><p>intersct tArray1 with tArray2</p><p></p><p># RESULT</p><p># tArray1[“colour”] = “green”</p><p></p><p># tArray2[“colour”] = “blue”</p><p># tArray2[“width”] = “100”</p></example> </examples> <history> <introduced version="1.1">Added.</introduced> <deprecated version=""></deprecated> <removed version=""></removed> <experimental version=""></experimental> <nonexperimental version=""></nonexperimental> </history> <objects> </objects> <platforms> <mac/> <windows/> <linux/> <ios/> <android/> </platforms> <classes> <desktop/> <server/> <web/> <mobile/> </classes> <security> </security> <classification> <category>Values & Properties</category> </classification> <references> <command tag="split">split Command</command> <command tag="union">union Command</command> </references> <description>Use the <b>intersect</b> <glossary tag="command">command</glossary> to filter out <glossary tag="element">elements</glossary> from an <glossary tag="array">array</glossary> according to the contents of another <glossary tag="array">array</glossary>.<p></p><p><b>Parameters:</b></p><p>The <i>array</i> is any <glossary tag="array">array</glossary> <glossary tag="variable">variable</glossary>.</p><p></p><p>The <i>templateArray</i> is any <glossary tag="array">array</glossary> <glossary tag="variable">variable</glossary>.</p><p>The <i>recursively</i> adverb indicates that the intersect should recurse through nested arrays.</p><p></p><p><b>Comments:</b></p><p>Each key of the <i>array</i> is checked to see whether there is a matching <glossary tag="key">key</glossary> in the <i>templateArray</i>. The <glossary tag="element">elements</glossary> of <i>array</i> that do not match an <keyword tag="element">element</keyword> of the <i>templateArray</i> are removed from the <i>array</i>.</p><p></p><p>The content of individual elements of the <i>templateArray</i> does not affect the final result. Only which <glossary tag="element">elements</glossary> exist in the <i>templateArray</i>, not their content, controls which <glossary tag="element">elements</glossary> of the <i>array</i> are retained and which are removed. If the <i>array</i> and <i>templateArray</i> have the same set of <glossary tag="element">elements</glossary> but different content in each <keyword tag="element">element</keyword>, the <b>intersect</b> <glossary tag="command">command</glossary> does not change the value of the <i>array</i>.</p></description></doc>