Énumérations » Historique » Version 1
Patrice Nadeau, 2024-01-27 14:59
| 1 | 1 | Patrice Nadeau | # Énumérations |
|---|---|---|---|
| 2 | |||
| 3 | ## Règles |
||
| 4 | 1. Comportent au maximum 31 caractères |
||
| 5 | 1. En majuscule |
||
| 6 | 1. Commence par une lettre |
||
| 7 | |||
| 8 | ## Exemple |
||
| 9 | ```c |
||
| 10 | /** |
||
| 11 | * @brief Liste des valeurs STATUS |
||
| 12 | */ |
||
| 13 | enum STATUS_LIST { |
||
| 14 | /** @brief Le processus est OK */ |
||
| 15 | STATUS_OK = 0, |
||
| 16 | /** @brief Le processus est en cours d'initialisation */ |
||
| 17 | STATUS_INIT, |
||
| 18 | /** @brief Le processus est arrêté */ |
||
| 19 | STATUS_HALTED |
||
| 20 | }; |
||
| 21 | ``` |
||
| 22 | |||
| 23 | ## Justifications |
||
| 24 | * Permet l’utilisation dans une boucle avec des valeurs prédéfinis |