$Upcase: Difference between revisions

From m204wiki
Jump to navigation Jump to search
m (indexing test comment)
 
(10 intermediate revisions by 3 users not shown)
Line 1: Line 1:
<p>The $UPCASE function translates a lowercase or mixed-case string into an uppercase-only string. The translation affects only the uppercase letters of the specified language. </p>
<p>
<b>Syntax</b>
The <var>$Upcase</var> function translates a lowercase or mixed-case string into an uppercase-only string. The translation affects only the uppercase letters of the specified language. </p>
<p class="code">$UPCASE(string <var>[</var>,language<var>]</var>)
 
==Syntax==
<p class="syntax">$UPCASE(<span class="term">string</span> [,<span class="term">language</span>])
</p>
</p>
<p>where:</p>
<p>
<p><var>The string</var> argument represents the characters to verify. which must be entered as follows:</p>
Where:</p>
<ul>
<li>The <var class="term">string</var> argument represents the characters to verify, which must be entered as follows:
<ul>
<ul>
<li>A literal enclosed by quotation marks.</li>
<li>A literal enclosed by quotation marks.</li>
</li>
 
<li>A %variable.</li>
<li>A %variable.</li>
</li>
 
<li>A field name without quotation marks. In this case, the function call must be embedded in a FOR EACH RECORD loop where the current value of the field is verified.</li>
<li>A field name without quotation marks. In this case, the function call must be embedded in a FOR EACH RECORD loop where the current value of the field is verified.</li>
</li>
</ul></li>
</ul>
 
<p><var>The optional language</var> argument specifies the language to use. The language argument is handled as follows:</p>
<li>The optional <var class="term">language</var> argument specifies the language to use. The <var class="term">language</var> argument is handled as follows:
<ul>
<ul>
<li>Omitting this argument instructs <var class="product">Model&nbsp;204</var> to perform the validation for U.S. English, even if the value of the LANGUSER parameter is not US.</li>
<li>Omitting this argument instructs <var class="product">Model&nbsp;204</var> to perform the validation for U.S. English, even if the value of the <var>LANGUSER</var> parameter is not <code>US</code>.</li>
</li>
 
<li>An asterisk enclosed in quotation marks ('*') instructs <var class="product">Model&nbsp;204</var> to use the value of the LANGUSER parameter.</li>
<li>An asterisk enclosed in quotation marks (<tt>'*'</tt>) instructs <var class="product">Model&nbsp;204</var> to use the value of the <var>LANGUSER</var> parameter.</li>
</li>
 
<li>A literal name of a valid language enclosed in quotation marks. If the name you enter is not supported, the request is canceled with an error message. See The LANGUSER parameter in the Rocket <var class="product">Model&nbsp;204</var> Parameter and Command Reference Manual for the valid values.</li>
<li>A literal name of a valid language enclosed in quotation marks. If the name you enter is not supported, the request is canceled with an error message. See the <var>[[LANGUSER parameter|LANGUSER]]</var> parameter for the valid values.</li>
</li>
</ul></li>
</ul>
</ul>
<b>Examples</b>
 
==Examples==
<p>The following examples return uppercase strings for mixed case entries.</p>
<p>The following examples return uppercase strings for mixed case entries.</p>
<table>
<table>
Line 30: Line 35:
<th>Language</th>
<th>Language</th>
</tr>
</tr>
<tr>
<tr>
<td>
<td>
<p class="code"><var>$UPCASE('Name and address')</var>
<p class="codeInTable">$UPCASE('Name and address')</p></td>
</p></td>
<td><p class="codeInTable">NAME AND ADDRESS</p></td>
<td>
<td><p>U.S. English</p></td>
<p class="code"><var>'NAME AND ADDRESS'</var>
</p></td>
<td>U.S. English</td>
</tr>
</tr>


<tr>
<tr>
<td>$UPCASE('�le d'Orl�ans','FRENCHC')</td>
<td><p class="codeInTable">$UPCASE('&#206;le d'Orl&#233;ans','FRENCHC')</p></td>
<td>
<td><p class="codeInTable">&#206;LE D'ORL&#201;ANS</p></td>
<p class="code"><var>'�LE D'ORL�ANS'</var>
<td><p>French Canadian</p></td>
</p></td>
<td>French Canadian</td>
</tr>
</tr>


<tr>
<tr>
<td><p class="codeInTable">$UPCASE('�le d'Orl�ans')</p></td>
<td><p class="codeInTable">$UPCASE('&#206;le d'Orl&#233;ans')</p></td>
<td><p class="codeInTable">'ILE D'ORLeANS</p></td>
<td><p class="codeInTable">ILE D'ORLeANS</p></td>
<td>U.S. English</td>
<td><p>U.S. English</p></td>
</tr>
</tr>
</table>
</table>
<b>Note</b>
<p class="note"><b>Note:</b>
<p>In U.S. English no accented characters have case translation.</p>
In U.S. English, no accented characters have case translation.</p>


<!— Index terms
<!-- $upcase see toUpper (String function) -->
toUpper (String function) -->


[[Category:SOUL $functions]]
[[Category:SOUL $functions]]

Latest revision as of 01:08, 9 March 2016

The $Upcase function translates a lowercase or mixed-case string into an uppercase-only string. The translation affects only the uppercase letters of the specified language.

Syntax

$UPCASE(string [,language])

Where:

  • The string argument represents the characters to verify, which must be entered as follows:
    • A literal enclosed by quotation marks.
    • A %variable.
    • A field name without quotation marks. In this case, the function call must be embedded in a FOR EACH RECORD loop where the current value of the field is verified.
  • The optional language argument specifies the language to use. The language argument is handled as follows:
    • Omitting this argument instructs Model 204 to perform the validation for U.S. English, even if the value of the LANGUSER parameter is not US.
    • An asterisk enclosed in quotation marks ('*') instructs Model 204 to use the value of the LANGUSER parameter.
    • A literal name of a valid language enclosed in quotation marks. If the name you enter is not supported, the request is canceled with an error message. See the LANGUSER parameter for the valid values.

Examples

The following examples return uppercase strings for mixed case entries.

Function code... Returns... Language

$UPCASE('Name and address')

NAME AND ADDRESS

U.S. English

$UPCASE('Île d'Orléans','FRENCHC')

ÎLE D'ORLÉANS

French Canadian

$UPCASE('Île d'Orléans')

ILE D'ORLeANS

U.S. English

Note: In U.S. English, no accented characters have case translation.