<doc>
  <legacy_id>1660</legacy_id>
  <name>is a</name>
  <type>operator</type>
  <syntax>
    <example><i>value</i> is a[n] {array | boolean | color | date | integer | number | point | rect | ASCII string }</example>
  </syntax>
  <library></library>
  <objects>
  </objects>
  <synonyms>
    <synonym>is an</synonym>
  </synonyms>
  <classification>
    <category>Math, Logic, &amp; Dates</category>
  </classification>
  <references>
    <keyword tag="point">point Keyword</keyword>
    <keyword tag="integer">integer Keyword</keyword>
    <command tag="convert">convert Command</command>
    <function tag="isNumber">isNumber Function</function>
    <function tag="colorNames">colorNames Function</function>
  </references>
  <history>
    <introduced version="1.0">Added.</introduced>
    <changed version="2.9"></changed>
  </history>
  <platforms>
    <mac/>
    <windows/>
    <linux/>
    <ios/>
    <android/>
  </platforms>
  <classes>
    <desktop/>
    <server/>
    <web/>
    <mobile/>
  </classes>
  <security>
  </security>
  <summary><glossary tag="evaluate">Evaluates</glossary> to true if a <function tag="value">value</function> is of the specified type, false otherwise.</summary>
  <examples>
    <example>"1/16/98" is a date <i>-- evaluates to true</i></example>
    <example>1 is a boolean <i>-- evaluates to false</i></example>
    <example>45.4 is an integer <i>-- evaluates to false</i></example>
    <example>"red" is a color <i>-- evaluates to true</i></example>
    <example>local tArray</p><p>put "test" into tArray[1] </p><p>put tArray is an array -- evaluates to true</example>
	<example>numToChar(128) is an ASCII string <i>-- evaluates to false</i></example>
  </examples>
  <description>
    <p>Use the <b>is a</b> <glossary tag="operator">operator</glossary> to <glossary tag="validate">validate</glossary> data to make sure it's the right type.</p><p/><p><b>Parameters:</b></p><p>The <i>value</i> is any source of value.</p><p/><p><b>Comments:</b></p><p>This operator is useful for checking whether the user has entered data correctly, and for checking parameters before sending them to a handler to avoid a script error caused by feeding data of one type to an operator or function that requires a different type.</p><p/><p>A <i>value</i> is a(n):</p><p>        * array if it's <function tag="keys">keys function</function> is not empty.</p><p/><p>        * boolean or logical if it is one of the two constants <b>true</b> or false</p><p/><p>        * color if it is a valid color reference</p><p/><p>        * date if it is in one of the formats produced by the <b>date</b> or <function tag="time">time</function> functions</p><p/><p>        * integer if it consists of digits (with an optional leading minus sign)</p><p/><p>        * number if it consists of digits, optional leading minus sign, optional decimal point, and optional "E" or       "e" (scientific notation)</p><p/><p>        * point if it consists of two numbers separated by a comma</p><p/><p>        * rect if it consists of four numbers separated by commas</p><p>        * ASCII string if it does not contain any characters greater than charToNum(127)</p><p/><p/><p>All the types other than boolean can also include leading or trailing white space characters.</p><p/><p><b>Note:</b> To ensure compatibility with SuperCard stacks, the <b>is a color</b> operator returns true for any integer, although integers are not valid colors in LiveCode. If you need to strictly verify a color then you can write a wrapper function to do so that checks that the color is not an integer.</p><p/><p><font face="tahoma"><b>Note:</b> The range of dates that LiveCode can handle is limited by the operating system's date routines. In particular, Windows systems are limited to dates after 1/1/1970. This means that the<b> is a date</b> operator will return false for dates before 1/1/1970 on Windows.</font></p><p/><p>The <b>is a</b> <glossary tag="operator">operator</glossary> is the logical inverse of the <operator tag="is not a">is not a</operator> <glossary tag="operator">operator</glossary>. When one is true, the other is false.</p><p/><p><b>Changes:</b></p><p>The <i>is an array</i> form was added in version 2.9</p>
  </description>
</doc>