Next: 6.7.4 The boolean type Up: 6.7 Operators Previous: 6.7.2 The complex type Contents

## 6.7.3 The character type

Character constants are written as single characters enclosed in single quotes. You can use the relational operators (`<`, `<=`, `>`, `>=`, `==`) to sort characters by ASCII order. You can cast a character to a real to get its ASCII value. You can cast a real ASCII value to a character.

> | `` | `` |  | `` | `` |  | `` | `` |  | `` | `` |  | `` | `` |  | `` | `` |  | `` | `` |  | `` |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |
> | `(int) 'A' == 65` |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |
> | `(char) 65 == 'A'` |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |
> | `is_digit x = '0' <= x && x <= '9'` |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |

Next: 6.7.4 The boolean type Up: 6.7 Operators Previous: 6.7.2 The complex type Contents