User Tools


Differences

This shows you the differences between two versions of the page.

Link to this comparison view

cl:types:base-char [2017/05/01 21:00] (current)
Line 1: Line 1:
 +====== Type BASE-CHAR ======
 +
 +====Supertypes====
 +**base-char**,​ **[[CL:​Types:​character]]**,​ **[[CL:​Types:​t]]**
 +
 +====Description====
 +The type **[[CL:​Types:​base-char]]** is defined as the //​[[CL:​Glossary:​upgraded array element type]]// of **[[CL:​Types:​standard-char]]**. An //​[[CL:​Glossary:​implementation]]//​ can support additional subtypes of **[[CL:​Types:​character]]** (besides the ones listed in this standard) that might or might not be supertypes of [[CL:​Types:​base-char]]. In addition, an //​[[CL:​Glossary:​implementation]]//​ can define **[[CL:​Types:​base-char]]** to be the //​[[CL:​Glossary:​same]]//​ //​[[CL:​Glossary:​type]]//​ as **[[CL:​Types:​character]]**.
 +
 +//​[[CL:​Glossary:​base character|base characters]]//​ are distinguished in the following respects:
 +
 +  * 1) The type **[[CL:​Types:​standard-char]]** is a //​[[CL:​Glossary:​subrepertoire]]//​ of the type **[[CL:​Types:​base-char]]**. ​
 +  * 2) The selection of //​[[CL:​Glossary:​base character|base characters]]//​ that are not //​[[CL:​Glossary:​standard character|standard characters]]//​ is implementation defined. ​
 +  * 3) Only //​[[CL:​Glossary:​object|objects]]//​ of the type **[[CL:​Types:​base-char]]** can be //​[[CL:​Glossary:​element|elements]]//​ of a //​[[CL:​Glossary:​base string]]//​. ​
 +  * 4) No upper bound is specified for the number of characters in the **[[CL:​Types:​base-char]]** //​[[CL:​Glossary:​repertoire]]//;​ the size of that //​[[CL:​Glossary:​repertoire]]//​ is //​[[CL:​Glossary:​implementation-defined]]//​. The lower bound is ''​96'',​ the number of //​[[CL:​Glossary:​standard character|standard characters]]//​.
 +
 +Whether a character is a //​[[CL:​Glossary:​base character]]//​ depends on the way that an //​[[CL:​Glossary:​implementation]]//​ represents //​[[CL:​Glossary:​string|strings]]//,​ and not any other properties of the //​[[CL:​Glossary:​implementation]]//​ or the host operating system. For example, one implementation might encode all //​[[CL:​Glossary:​string|strings]]//​ as characters having 16-bit encodings, and another might have two kinds of //​[[CL:​Glossary:​string|strings]]//:​ those with characters having 8-bit encodings and those with characters having 16-bit encodings. In the first //​[[CL:​Glossary:​implementation]]//,​ the type **[[CL:​Types:​base-char]]** is equivalent to the type **[[CL:​Types:​character]]**:​ there is only one kind of //​[[CL:​Glossary:​string]]//​. In the second //​[[CL:​Glossary:​implementation]]//,​ the //​[[CL:​Glossary:​base character|base characters]]//​ might be those //​[[CL:​Glossary:​character|characters]]//​ that could be stored in a //​[[CL:​Glossary:​string]]//​ of //​[[CL:​Glossary:​character|characters]]//​ having 8-bit encodings. In such an implementation,​ the type **[[CL:​Types:​base-char]]** is a //​[[CL:​Glossary:​proper subtype]]// of the type **[[CL:​Types:​character]]**.
 +
 +The type **[[CL:​Types:​standard-char]]** is a subtype of **[[CL:​Types:​base-char]]**.
 +
 +\issue{CHARACTER-VS-CHAR:​LESS-INCONSISTENT-SHORT} \issue{CHARACTER-PROPOSAL:​2-3-1}