<doc>
  <legacy_id>2189</legacy_id>
  <name>there is a</name>
  <type>operator</type>
  <syntax>
    <example>there is a {<i>object </i>| file <i>filePath </i>| folder <i>folderPath | </i>process <i>procName</i>}</example>
  </syntax>
  <library></library>
  <objects>
  </objects>
  <synonyms>
    <synonym>there is an</synonym>
  </synonyms>
  <classification>
    <category>Objects &amp; Messages</category>
    <category>Windows &amp; Dialog Boxes</category>
    <category>Files, Folders, &amp; Resources</category>
  </classification>
  <references>
    <function tag="exists">exists Function</function>
  </references>
  <history>
    <introduced version="1.0">Added.</introduced>
  </history>
  <platforms>
    <mac/>
    <windows/>
    <linux/>
    <ios/>
    <android/>
  </platforms>
  <classes>
    <desktop/>
    <server/>
    <web/>
    <mobile/>
  </classes>
  <security>
    <disk access="???"/>
    <process/>
  </security>
  <summary><glossary tag="evaluate">Evaluates</glossary> to  true if the specified <glossary tag="object">object</glossary>, <keyword tag="file">file</keyword>, <property tag="defaultFolder">folder</property>, or <glossary tag="process">process</glossary> exists, false otherwise.</summary>
  <examples>
    <example>there is a card button 1 <code><i>-- evaluates to true if any card buttons exist</i></code></example>
    <example>if there is a card ID 3445 then go card ID 3445</p><p>put (there is a file it) into fileIsThere</example>
  </examples>
  <description>
    <p>Use the <b>there is a</b> <glossary tag="operator">operator</glossary> to make sure an <glossary tag="object">object</glossary> or <keyword tag="file">file</keyword> exists before working with it, or to find out whether there are any objects of a specified type.</p><p/><p><b>Parameters:</b></p><p>The <i>object</i> is any <href tag="reference/object_reference.rev">object reference</href>.</p><p/><p>The <i>filePath</i> specifies the <glossary tag="file path">name and location</glossary> of a <keyword tag="file">file</keyword> you want to check. If you specify a name but not a location, LiveCode looks for the <keyword tag="file">file</keyword> in the <property tag="defaultFolder">defaultFolder</property>.</p><p/><p>The <i>folderPath</i> specifies the <glossary tag="file path">name and location</glossary> of a <property tag="defaultFolder">folder</property> you want to check. If you specify a name but not a location, LiveCode looks for the <property tag="defaultFolder">folder</property> in the <property tag="defaultFolder">defaultFolder</property>.</p><p/><p>The <i>procName</i> is the name of any <glossary tag="process">process</glossary> that LiveCode started.</p><p/><p><b>Comments:</b></p><p>The <b>there is a</b> <glossary tag="operator">operator</glossary> is the logical inverse of the <operator tag="there is no">there is no</operator> <glossary tag="operator">operator</glossary>. When one is true, the other is false.</p><p/><p>The expression <code>there is a stack <i>stackName</i></code> <glossary tag="evaluate">evaluates</glossary> to true if the <object tag="stack">stack</object> is open, if it is closed but <glossary tag="loaded into memory">loaded into memory</glossary>, or if it appears in the <property tag="stackFiles">stackFiles</property> <glossary tag="property">property</glossary> of any open <object tag="stack">stack</object>.</p><p/><p><code/><img src="202651"/> <b>Tip:</b><code/> To find out whether a stack is open, check its <property tag="mode">mode</property> <glossary tag="property">property</glossary>. A <object tag="stack">stack</object> that is <glossary tag="loaded into memory">loaded into memory</glossary> but is not open has a <property tag="mode">mode</property> of zero.</p><p/><p><code/><b>Note:</b><code/> The <b>there is a</b> <glossary tag="operator">operator</glossary> is implemented internally as a <control_st tag="function">function</control_st>, and therefore has lower <glossary tag="precedence">precedence</glossary> than other <glossary tag="operator">operators</glossary>.</p>
  </description>
</doc>