$Len: Difference between revisions

From m204wiki
Jump to navigation Jump to search
m (Mlarocca moved page $LEN to $Len: Lower case change)
m (misc formatting)
 
Line 1: Line 1:
<p>The $LEN function determines the current length of the value of a STRING. The $LEN function takes a fieldname, character literal, or %variable as its one argument.   </p>
<p>
<b>Example 1</b>
The <var>$Len</var> function determines the current length of the value of a <var>String</var>. The <var>$Len</var> function takes a field name, character literal, or %variable as its one argument. </p>
<p class="code">$LEN(STATE)
 
</p>
==Examples==
<p>equals 4 if the STATE field of the current record contains OHIO. </p>
<ol>
<b>Example 2</b>
<li>The <var>$Len</var> result in the following statement is 4 if the <code>STATE</code> field of the current record contains <code>OHIO</code>:
<p class="code">$LEN (%NAME)  
<p class="code">%n = $len(STATE)  
</p>
</p></li>
<p>equals 13 if the %NAME variable has a current value of Richard Smith</p>
 
<li>The <var>$Len</var> result in the following statement is 13 if the <code>%name</code> variable has a current value of <code>Richard Smith</code>:
<p class="code">%n = $len(%name)
</p></li>
</ol>
 
[[Category:SOUL $functions]]
[[Category:SOUL $functions]]

Latest revision as of 00:08, 22 June 2018

The $Len function determines the current length of the value of a String. The $Len function takes a field name, character literal, or %variable as its one argument.

Examples

  1. The $Len result in the following statement is 4 if the STATE field of the current record contains OHIO:

    %n = $len(STATE)

  2. The $Len result in the following statement is 13 if the %name variable has a current value of Richard Smith:

    %n = $len(%name)