Chapter 19 Boucles `repeat
Une boucle repeat effectue une opération jusqu’à ce qu’elle soit délibérément arrêtée.
On peut soit utiliser Escape pour l’arrêter, ou plus adéquatement, utiliser break.
repeat {
expression
if {
condition
} break
}If you attempt to run the following chunk of code using repeat, it will display the result until you press Escape.
repeat {
print("Appuyez sur 'Esc' pour m'arrêter !")
}[1] "Appuyez sur 'Esc' pour m'arrêter !"
[1] "Appuyez sur 'Esc' pour m'arrêter !"
...
...
[1] "Appuie sur 'Esc' pour m'arrêter !"