Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit e61b3cb

Browse files
authoredDec 15, 2020··
Update break.adoc
Traduzione in italiano
1 parent a1dccde commit e61b3cb

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed
 

‎Language/Structure/Control Structure/break.adoc

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ subCategories: [ "Control Structure" ]
1818
[float]
1919
=== Description
2020
[%hardbreaks]
21-
`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.
21+
`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].
2222
[%hardbreaks]
2323

2424
--
@@ -31,15 +31,15 @@ subCategories: [ "Control Structure" ]
3131
[#howtouse]
3232
--
3333
[float]
34-
=== Example Code
35-
In the following code, the control exits the `for` loop when the sensor value exceeds the threshold.
34+
=== Codice di esempio
35+
Nel codice che segue, il controllo esce dal ciclo `for` quando il valore del sensore supera la soglia.
3636
[source,arduino]
3737
----
3838
for (x = 0; x < 255; x ++)
3939
{
4040
analogWrite(PWMpin, x);
41-
sens = analogRead(sensorPin);
42-
if (sens > threshold){ // bail out on sensor detect
41+
sensore = analogRead(sensorPin);
42+
if (sensore > soglia){ // bail out on sensor detect
4343
x = 0;
4444
break;
4545
}

0 commit comments

Comments
 (0)
Please sign in to comment.