Immediate values should not be used in the code
The immediate values or constants should not be used in the code.
Detailed explanation : Using immediate values or constants in the code gives less information than using an explicit well named constant. In case of modification of values to tweek the program, you need to .
Example: Don't do:
FOR I IN 1..16 DO ... END_FOR;
Instead do:
FOR I IN 1..ELEMENT_MAX DO ... END_FOR;
Level :
L'utilisation des valeurs immédiate est interdite
L'utilisation des valeurs immédiates est interdite.
Explication complémentaire : Il ne faut pas utiliser les valeurs immédiates dans le programme. Cela nuit à la compréhension et limite l'évolutivité du programme.
Exemple: Il ne faut pas faire:
FOR I IN 1..16 DO ... END_FOR;
Il faut faire:
FOR I IN 1..ELEMENT_MAX DO ... END_FOR;
Niveau conseillé : Obligatoire