Jump to content

Loops/Break: Difference between revisions

Added solution for Action!
m (Fixed the XBS example)
(Added solution for Action!)
Line 226:
Resultat = 10
</pre>
=={{header|Action!}}==
<lang Action!>PROC Main()
BYTE v
 
PrintE("Before loop")
DO
v=Rand(20)
PrintBE(v)
IF v=10 THEN
EXIT
FI
OD
PrintE("After loop")
RETURN</lang>
{{out}}
[https://gitlab.com/amarok8bit/action-rosetta-code/-/raw/master/images/Break.png Screenshot from Atari 8-bit computer]
<pre>
Before loop
2
6
3
4
11
17
5
17
10
After loop
</pre>
 
=={{header|Ada}}==
<lang Ada>with Ada.Text_IO; use Ada.Text_IO;
Anonymous user
Cookies help us deliver our services. By using our services, you agree to our use of cookies.