From e61b3cb15d9c02296721fcdab70003c0eebf357d Mon Sep 17 00:00:00 2001 From: galessandroni Date: Tue, 15 Dec 2020 19:01:06 +0100 Subject: [PATCH] Update break.adoc Traduzione in italiano --- Language/Structure/Control Structure/break.adoc | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Language/Structure/Control Structure/break.adoc b/Language/Structure/Control Structure/break.adoc index 37e8b4f..cac0a17 100644 --- a/Language/Structure/Control Structure/break.adoc +++ b/Language/Structure/Control Structure/break.adoc @@ -18,7 +18,7 @@ subCategories: [ "Control Structure" ] [float] === Description [%hardbreaks] -`break` is used to exit from a link:../for[for], link:../while[while] or link:../dowhile[do...while] loop, bypassing the normal loop condition. It is also used to exit from a link:../switchcase[switch case] statement. +`break` รจ usata per uscire da costrutti link:../for[for], link:../while[while] o link:../dowhile[do...while], scavalcando le ordinarie condizioni imposte dal costrutto. Viene anche utilizzata per uscire dal costrutto link:../switchcase[switch case]. [%hardbreaks] -- @@ -31,15 +31,15 @@ subCategories: [ "Control Structure" ] [#howtouse] -- [float] -=== Example Code -In the following code, the control exits the `for` loop when the sensor value exceeds the threshold. +=== Codice di esempio +Nel codice che segue, il controllo esce dal ciclo `for` quando il valore del sensore supera la soglia. [source,arduino] ---- for (x = 0; x < 255; x ++) { analogWrite(PWMpin, x); - sens = analogRead(sensorPin); - if (sens > threshold){ // bail out on sensor detect + sensore = analogRead(sensorPin); + if (sensore > soglia){ // bail out on sensor detect x = 0; break; }