<doc>
  <legacy_id>1769</legacy_id>
  <name>of</name>
  <type>keyword</type>
  <syntax>
  </syntax>
  <library></library>
  <objects>
  </objects>
  <synonyms>
  </synonyms>
  <classification>
    <category>Writing LiveCode</category>
    <category>Values &amp; Properties</category>
    <category>Text and Data Processing</category>
  </classification>
  <references>
    <keyword tag="the">the Keyword</keyword>
    <keyword tag="in">in Keyword</keyword>
  </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>Designates the <glossary tag="object">object</glossary> a <glossary tag="property">property</glossary> belongs to, or the <glossary tag="parameter">parameter</glossary> of a <control_st tag="function">function</control_st>, or the <keyword tag="string">string</keyword> that contains a <glossary tag="chunk expression">chunk expression</glossary>.</summary>
  <examples>
    <example>set the backgroundColor of field "Alert" to red</example>
    <example>get the length of thisDate</example>
    <example>put word 12 of it after field "Go On"</example>
  </examples>
  <description>
    <p>Use the <b>of</b> <glossary tag="keyword">keyword</glossary> to designate an attribute of an <glossary tag="object">object</glossary> or <glossary tag="chunk">chunk</glossary>, or to designate a <glossary tag="parameter">parameter</glossary> of a built-in <control_st tag="function">function</control_st>.</p><p/><p><b>Comments:</b></p><p>When designating a property, use the <b>of</b> <glossary tag="keyword">keyword</glossary> between the <glossary tag="property">property</glossary> name and the <href tag="reference/object_reference.rev">object reference</href>. (The <b>of</b> <glossary tag="keyword">keyword</glossary> is not used when referring to <glossary tag="global">global properties</glossary>, only <property tag="properties">properties</property> of <glossary tag="object">objects</glossary>.)</p><p/><p>In an expression that includes a built-in function with one parameter, you can use either of two forms:</p><p/><p><code/>  functionName(<i>parameter</i>)</p><p><code>  functionName of <i>parameter</i></code></p><p/><p>The <b>of</b> <glossary tag="keyword">keyword</glossary> cannot be used for <href tag="dictionary/property/2381.xml">custom functions</href>, or for built-in <glossary tag="function">functions</glossary> with more than one <glossary tag="parameter">parameter</glossary>.</p><p/><p>When designating a part of a string, use the <b>of</b> <glossary tag="keyword">keyword</glossary> after the <glossary tag="chunk">chunk</glossary> type. For example, to specify the first <keyword tag="word">word</keyword> of a <keyword tag="string">string</keyword>, use an <glossary tag="expression">expression</glossary> like<code> word 1 of <i>string</i></code>. In complex <glossary tag="chunk expression">chunk expressions</glossary> with multiple <glossary tag="chunk">chunk</glossary> types, use the <b>of</b> <glossary tag="keyword">keyword</glossary> after each <glossary tag="chunk">chunk</glossary> type. For example, to specify the last <keyword tag="character">character</keyword> of the second <keyword tag="line">line</keyword> of a <keyword tag="string">string</keyword>, use an <glossary tag="expression">expression</glossary> like this:</p><p/><p><code>  last char of line 2 of <i>string</i></code></p><p/><p>When designating the number of chunks in a string, use the <b>of</b> <glossary tag="keyword">keyword</glossary> after the <glossary tag="chunk">chunk</glossary> type. For example, to get the number of <keyword tag="lines">lines</keyword> in a <keyword tag="string">string</keyword>, use an <glossary tag="expression">expression</glossary> like this:</p><p/><p><code>  the number of lines of <i>string</i></code></p>
  </description>
</doc>