<doc>
  <legacy_id>1645</legacy_id>
  <name>selectedChunk</name>
  <type>function</type>
  <syntax>
    <example>the selectedChunk</example>
    <example>selectedChunk</example>
  </syntax>
  <library></library>
  <objects>
  </objects>
  <synonyms>
  </synonyms>
  <classification>
    <category>User Interaction</category>
  </classification>
  <references>
    <command tag="select">select Command</command>
    <function tag="selectedLoc">selectedLoc Function</function>
    <function tag="clickChunk">clickChunk Function</function>
    <function tag="foundChunk">foundChunk Function</function>
    <function tag="mouseChunk">mouseChunk Function</function>
    <function tag="selectedField">selectedField Function</function>
    <function tag="selectedLine">selectedLine 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><glossary tag="return">Returns</glossary> a <glossary tag="chunk expression">chunk expression</glossary> describing the location of the text <keyword tag="selection">selection</keyword> or <glossary tag="insertion point">insertion point</glossary>.</summary>
  <examples>
    <example>the selectedChunk</example>
    <example>put the selectedChunk into storedChunk</example>
  </examples>
  <description>
    <p>Use the <b>selectedChunk</b> <control_st tag="function">function</control_st> to determine which text is <property tag="selected">selected</property>.</p><p/><p><b>Value:</b></p><p>The <b>selectedChunk</b> <control_st tag="function">function</control_st> <glossary tag="return">returns</glossary> a <glossary tag="chunk expression">chunk expression</glossary> of the form</p><p><code>  char <i>startChar</i> to <i>endChar</i> of field <i>fieldNumber</i></code></p><p/><p><b>Comments:</b></p><p>The return value reports the selected text: the <i>startChar</i> is the first <keyword tag="character">character</keyword> of the selection, and the <i>endChar</i> is the last <keyword tag="character">character</keyword>.</p><p/><p>If no text is selected but the text insertion point is in a field, the <i>startChar</i> is the <keyword tag="character">character</keyword> after the <glossary tag="insertion point">insertion point</glossary>, and the <i>endChar</i> is the <keyword tag="character">character</keyword> before the <glossary tag="insertion point">insertion point</glossary>. In this case, the <i>endChar</i> is one less than the <i>startChar</i>.</p><p/><p>If there is no insertion point or text selection, the <b>selectedChunk</b> <control_st tag="function">function</control_st> <glossary tag="return">returns</glossary> empty.</p><p/><p>To get actual text that is selected, use the <b>selectedText</b> <control_st tag="function">function</control_st>.</p>
  </description>
</doc>