Читать книгу Compilador C CCS y Simulador Proteus para Microcontroladores PIC - Eduardo García Breijo - Страница 14
2.4 Las constantes
ОглавлениеLas constantes se pueden especificar en decimal, octal, hexadecimal o en binario:
| 123 | Decimal |
| 0123 | Octal (0) |
| 0x123 | Hexadecimal (0x) |
| 0b010010 | Binario (0b) |
| ‘x’ | Carácter |
| ‘\010’ | Carácter octal |
| ‘\xA5’ | Carácter hexadecimal |
Además, se pueden definir constantes con un sufijo:
| Int8 | 127U |
| Long | 80UL |
| Signed INT16 | 80L |
| Float | 3.14F |
| Char | Con comillas simples ‘C’ |
También se definen caracteres especiales, algunos como:
| \n | Cambio de línea |
| \r | Retorno de carro |
| \t | Tabulatión |
| \b | Backspace |