COMPOPT parameter: Difference between revisions

From m204wiki
Jump to navigation Jump to search
No edit summary
m (misc formatting)
 
(One intermediate revision by one other user not shown)
Line 13: Line 13:
<dd>Before Sirius Mods 6.7
<dd>Before Sirius Mods 6.7
</dl>
</dl>
==Description==
==Description==
As of Sirius Mods version 6.8, the system parameter COMPOPT facilitates migration to [[Mixed-case SOUL|mixed-case SOUL]]. COMPOPT is a <var class="product">Model 204</var> bitmask parameter that must be set in the CCAIN (User 0 input) stream. The bits in COMPOPT have the following meanings:
The system parameter <var>COMPOPT</var> facilitates migration to [[Mixed-case SOUL|mixed-case SOUL]]. <var>COMPOPT</var> is a <var class="product">Model&nbsp;204</var> bitmask parameter that must be set in the CCAIN (User 0 input) stream. The bits in <var>COMPOPT</var> have the following meanings:
; X'01'  
<table class="thJustBold">
: If on, all procedures start out in Sirius Case ToUpper mode, whether or not they begin with a mixed-case Begin statement. Sirius Case ToUpper mode translates all unquoted tokens to uppercase, so <var class="product">SOUL</var> statements, keywords, variable names, etc. may be written in mixed case. By setting the COMPOPT X'01' bit, a site is essentially enabling mixed-case SOUL almost everywhere.
<tr><th>X'01'</th>
; X'02'  
<td>If on, all procedures start out in <var>[[Sirius Case statement#sirCaseStmt|Sirius Case ToUpper]]</var> mode, whether or not they begin with a mixed-case <var>Begin</var> statement. <var>Sirius Case ToUpper</var> mode translates all unquoted tokens to uppercase, so <var class="product">SOUL</var> statements, keywords, variable names, etc. may be written in mixed case. By setting the <var>COMPOPT</var> X'01' bit, a site is essentially enabling mixed-case SOUL almost everywhere. </td></tr>
: If on, Sirius Case Leave compiler directives are to be ignored: if Sirius Case ToUpper is in effect, it remains in effect even if a Sirius Case Leave directive is encountered. Setting the COMPOPT X'02' bit along with the X'01' bit enables mixed-case SOUL everywhere, thus ensuring consistent language processing throughout an Online.
 
; X'04'  
<tr><th>X'02'</th>
: If on, image or image-item names, either literal or in variables, are to be automatically converted to uppercase before being used in methods or $functions. Since mixed-case SOUL is accomplished by translating unquoted tokens to uppercase, this case conversion for image or image-item names is the runtime equivalent of the compiler mixed-case support.<br /><br />Setting the COMPOPT X'04' bit enables image and image-item names that appear as literals in SOUL programs to be entered in mixed case. The only time this might be a problem is if there are true mixed-case image or image-item names in an application. A true mixed-case image or image-item name is one written in mixed case, either inside quotation marks (image and image-item names can indeed be put in quotes) or without Sirius Case ToUpper in effect. In general, neither of these is too likely, so true mixed-case image or image-item names are not likely in most applications.
<td>If on, <var>Sirius Case Leave</var> compiler directives are to be ignored: if <var>Sirius Case ToUpper</var> is in effect, it remains in effect even if a <var>Sirius Case Leave</var> directive is encountered. Setting the <var>COMPOPT</var> X'02' bit along with the X'01' bit enables mixed-case SOUL everywhere, thus ensuring consistent language processing throughout an Online. </td></tr>
 
<tr><th>X'04'</th>
<td>If on, image or image-item names, either literal or in variables, are to be automatically converted to uppercase before being used in methods or $functions. Since mixed-case SOUL is accomplished by translating unquoted tokens to uppercase, this case conversion for image or image-item names is the runtime equivalent of the compiler mixed-case support.
<p>
Setting the <var>COMPOPT</var> X'04' bit enables image and image-item names that appear as literals in SOUL programs to be entered in mixed case. The only time this might be a problem is if there are true mixed-case image or image-item names in an application. A true mixed-case image or image-item name is one written in mixed case, either inside quotation marks (image and image-item names can indeed be put in quotes) or without <var>Sirius Case ToUpper</var> in effect. In general, neither of these is too likely, so true mixed-case image or image-item names are not likely in most applications. </p></td></tr>
</table>


==See also==
<ul>
<li><var>[[SIRCOMP parameter|SIRCOMP]]</var>
</ul>
[[Category:System parameters]]
[[Category:System parameters]]
[[Category:Parameters]]
[[Category:Parameters]]

Latest revision as of 22:08, 1 September 2016

Compiler options

Summary

Default value
X'00'
Parameter type
System
Where set
User 0 CCAIN parameters
Related products
All
Introduced
Before Sirius Mods 6.7

Description

The system parameter COMPOPT facilitates migration to mixed-case SOUL. COMPOPT is a Model 204 bitmask parameter that must be set in the CCAIN (User 0 input) stream. The bits in COMPOPT have the following meanings:

X'01' If on, all procedures start out in Sirius Case ToUpper mode, whether or not they begin with a mixed-case Begin statement. Sirius Case ToUpper mode translates all unquoted tokens to uppercase, so SOUL statements, keywords, variable names, etc. may be written in mixed case. By setting the COMPOPT X'01' bit, a site is essentially enabling mixed-case SOUL almost everywhere.
X'02' If on, Sirius Case Leave compiler directives are to be ignored: if Sirius Case ToUpper is in effect, it remains in effect even if a Sirius Case Leave directive is encountered. Setting the COMPOPT X'02' bit along with the X'01' bit enables mixed-case SOUL everywhere, thus ensuring consistent language processing throughout an Online.
X'04' If on, image or image-item names, either literal or in variables, are to be automatically converted to uppercase before being used in methods or $functions. Since mixed-case SOUL is accomplished by translating unquoted tokens to uppercase, this case conversion for image or image-item names is the runtime equivalent of the compiler mixed-case support.

Setting the COMPOPT X'04' bit enables image and image-item names that appear as literals in SOUL programs to be entered in mixed case. The only time this might be a problem is if there are true mixed-case image or image-item names in an application. A true mixed-case image or image-item name is one written in mixed case, either inside quotation marks (image and image-item names can indeed be put in quotes) or without Sirius Case ToUpper in effect. In general, neither of these is too likely, so true mixed-case image or image-item names are not likely in most applications.

See also