User Tools


Differences

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

Link to this comparison view

cl:functions:char-int [2019/06/15 02:00]
cl:functions:char-int [2019/06/18 10:00] (current)
Line 1: Line 1:
 +====== Function CHAR-INT ======
 +
 +====Syntax====
 +  * **char-int** //​character//​ → //integer//
 +
 +====Arguments and Values====
 +  * //​character//​ - a //​[[CL:​Glossary:​character]]//​.
 +  * //integer// - a non-negative //​[[CL:​Glossary:​integer]]//​.
 +
 +====Description====
 +Returns a non-negative //​[[CL:​Glossary:​integer]]//​ encoding the //​character//​ object. The manner in which the //​[[CL:​Glossary:​integer]]//​ is computed is //​[[CL:​Glossary:​implementation-dependent]]//​. In contrast to **[[CL:​Functions:​sxhash]]**,​ the result is not guaranteed to be independent of the particular //​[[CL:​Glossary:​Lisp image]]//.
 +
 +If //​character//​ has no //​[[CL:​Glossary:​implementation-defined]]//​ //​[[CL:​Glossary:​attribute|attributes]]//,​ the results of **char-int** and **[[CL:​Functions:​char-code]]** are the same.
 +
 +====Examples====
 +<​blockquote>​
 +(char-int #\A) 
 +<​r>​65 ​       ; Implementation A
 +//or// 577    ; Implementation B
 +//or// 262145 ; Implementation C</r>
 +</​blockquote>​
 +
 +====Affected By====
 +None.
 +
 +====Exceptional Situations====
 +None.
 +
 +====See Also====
 +**[[CL:​Functions:​char-code|Function CHAR-CODE]]**
 +
 +====Notes====
 +<​blockquote>​
 +([[CL:​Functions:​char-equal|char=]] c1 c2) ≡ ([[CL:​Functions:​math-equal|=]] (char-int c1) (char-int c2))
 +</​blockquote>​
 +
 +\issue{CHARACTER-PROPOSAL:​2-1-2}