Dates and Times categories
Primitives
Chars
Strings

Chars

In CLAIRE chars are true object (i.e. not primitive) that hold an 8 bit value, one can obtain this value with integer!(c:char) and make a char from an integer i with char!(i:integer).

[XL] Starting with XL CLAIRE the internal 8 bit value is stored as an unsigned char (vs. signed char in CLAIRE 3) such the composition char!(integer!()) is actually the identity for all possible existing char in the system. If their is no char that hold a given value n then char!(n) will produce an error.


categories Charsnormal dispatch operationKernel method

<(x:char, y:char) -> boolean

returns true if ASCII code of x is lower than ASCII code of y


categories Charsnormal dispatch operationKernel method

<=(c1:char, c2:char) -> boolean

returns true if ASCII code of x is lower or equal to ASCII code of y


categories Charsnormal dispatch operationKernel method

>(x:char, y:char) -> boolean

returns true if ASCII code of x is greater than ASCII code of y


categories Charsnormal dispatch operationKernel method

>=(x:char, y:char) -> boolean

returns true if ASCII code of x is greater or equal to ASCII code of y


categories Charsnormal dispatch [XL] Kernel method

alpha?(c:char) -> boolean

alpha?(c) returns true when the char c is in the range ('a' .. 'z', 'A' .. 'Z').


categories Charsnormal dispatch [XL] Kernel method

digit?(c:char) -> boolean

digit?(c) returns true if c is in the interval ('0' .. '9').


categories Charsnormal dispatch Kernel method

integer!(c:char) -> integer

integer!(c) returns the ASCII code of c


categories Charsnormal dispatch [XL] Kernel method

lower?(c:char) -> boolean

lower?(c) returns true if c is not in ('A' .. 'Z').


categories Charsnormal dispatch [XL] Kernel method

space?(c:char) -> boolean

space?(c) returns true if c is in {' ', '\t', '\r', '\n'}.
 space?(' '-> true
 space?('\n'-> true
 space?('t'-> false


categories Charsnormal dispatch [XL] Kernel method

string!(self:char) -> string

make a new string from a a char self. The returned string always has of length of 1. One could use make_string to create a string of a given length filled with a given char.