<doc>
  <legacy_id>2056</legacy_id>
  <name>constant</name>
  <type>command</type>
  <syntax>
    <example>constant <i>constantsList</i></example>
  </syntax>
  <library></library>
  <objects>
  </objects>
  <synonyms>
  </synonyms>
  <classification>
    <category>Values &amp; Properties</category>
  </classification>
  <references>
    <command tag="local">local Command</command>
    <constant tag="formfeed">formfeed Constant</constant>
    <constant tag="six">six Constant</constant>
    <constant tag="ten">ten Constant</constant>
    <constant tag="slash">slash Constant</constant>
    <constant tag="iBeam">iBeam Constant</constant>
    <constant tag="zero">zero Constant</constant>
    <constant tag="space">space Constant</constant>
    <constant tag="four">four Constant</constant>
    <constant tag="false">false Constant</constant>
    <constant tag="arrow">arrow Constant</constant>
    <constant tag="colon">colon Constant</constant>
    <constant tag="CRLF">CRLF Constant</constant>
    <constant tag="pi">pi Constant</constant>
    <constant tag="help">help Constant</constant>
    <constant tag="comma">comma Constant</constant>
    <constant tag="plus">plus Constant</constant>
    <constant tag="eight">eight Constant</constant>
    <constant tag="five">five Constant</constant>
    <constant tag="quote">quote Constant</constant>
    <constant tag="empty">empty Constant</constant>
    <constant tag="null">null Constant</constant>
    <constant tag="seven">seven Constant</constant>
    <constant tag="watch">watch Constant</constant>
    <constant tag="three">three Constant</constant>
    <constant tag="two">two Constant</constant>
    <function tag="constantNames">constantNames 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>
  </security>
  <summary>Declares one or more labels to assign to <command tag="constant">constant</command> <glossary tag="value">values</glossary>.</summary>
  <examples>
    <example>constant defaultName="Jones"</example>
    <example>constant entryA="EF9993333WX786",entryB="GJ773281YX342"</example>
  </examples>
  <description>
    <p>Use the <b>constant</b> <glossary tag="command">command</glossary> to assign an unchanging value to a <glossary tag="keyword">keyword</glossary>.</p><p/><p><b>Parameters:</b></p><p>The <i>constantsList</i> consists of one or more <i>name</i>=<i>value</i> pairs, separated by commas:</p><p>	* The <i>name</i> is any <keyword tag="string">string</keyword>.</p><p>	* The <i>value</i> is any <glossary tag="literal string">literal string</glossary>.</p><p/><p><b>Comments:</b></p><p>Constants can be numbers, characters, logical values, or strings.</p><p/><p>A constant cannot be defined as an array, only as a single value.</p><p/><p><code/><b>Note:</b><code/>  Choose easy-to-understand names for <glossary tag="constant">constants</glossary> to improve the readability of your code. Use <glossary tag="constant">constants</glossary> as substitutes for long or convoluted <glossary tag="string">strings</glossary>.</p><p/><p>If you place the <b>constant</b> <glossary tag="statement">statement</glossary> in a <glossary tag="handler">handler</glossary>, you can use the <command tag="constant">constant</command> anywhere in the <glossary tag="handler">handler</glossary>. If you place the <b>constant</b> <glossary tag="statement">statement</glossary> in a <property tag="script">script</property> outside any <glossary tag="handler">handler</glossary>, you can use the <command tag="constant">constant</command> anywhere in the <glossary tag="handler">handlers</glossary> of that <property tag="script">script</property>.</p><p/><p>Once you have defined a constant, you cannot redefine it in the same handler; doing so causes an execution error.</p><p/><p>You can use the <b>constant</b> <glossary tag="command">command</glossary> to redefine <glossary tag="LiveCode">LiveCode's</glossary> built-in <glossary tag="constant">constants</glossary> within a <property tag="script">script</property> or <glossary tag="handler">handler</glossary>, but doing so makes your code harder to read and maintain. To find out whether a word is already defined as a built-in <command tag="constant">constant</command>, use the <function tag="constantNames">constantNames</function> <control_st tag="function">function</control_st>.</p><p/><p><code/><img src="202651"/> <b>Tip:</b><code/> To see a list of built-in constants, open the Documentation window, click LiveCode Dictionary, and choose "Constants" from the menu at the top of the window.</p>
  </description>
</doc>