Data update

This commit is contained in:
Ingy döt Net 2026-04-30 12:34:36 -04:00
parent 4bb20c9b71
commit cbaf4c4b64
12390 changed files with 318560 additions and 27248 deletions

View file

@ -0,0 +1,15 @@
with Ada.Text_IO;
use Ada.Text_IO;
procedure Loop_Continue is
begin
for I in 1..10 loop
Put (Integer'Image(I));
if I = 5 or I = 10 then
New_Line;
goto Continue;
end if;
Put (",");
<<Continue>> --Ada 2012 no longer requires a statement after the label
end loop;
end Loop_Continue;

View file

@ -0,0 +1,18 @@
with Ada.Text_IO;
use Ada.Text_IO;
procedure Loop_Continue is
begin
Print_All:
for I in 1 .. 10 loop
Print_Element: loop
Put (Integer'Image(I));
if I = 5 or I = 10 then
New_Line;
exit Print_Element;
end if;
Put (",");
exit Print_Element;
end loop Print_Element;
end loop Print_All;
end Loop_Continue;

View file

@ -1,9 +1,12 @@
set table to {return}
set table to ""
repeat with i from 1 to 10
if i < 5 or (i 6 and i < 10) then
set end of table to i & ", "
else if i = 5 or i = 10 then
set end of table to i & return
end if
repeat 1 times
set table to table & i
if i mod 5 = 0 then
set table to table & return
exit repeat
end if
set table to table & ", "
end repeat
end repeat
return table as string
return table

View file

@ -0,0 +1,10 @@
fun main() {
for i := 1; i <= 10; i += 1 {
print(i)
if i % 5 == 0 {
println('')
continue
}
print(', ')
}
}

View file

@ -0,0 +1,21 @@
IDENTIFICATION DIVISION.
PROGRAM-ID. loop-continue.
DATA DIVISION.
WORKING-STORAGE SECTION.
01 i PIC 99.
PROCEDURE DIVISION.
PERFORM VARYING i FROM 1 BY 1 UNTIL 10 < i
DISPLAY i WITH NO ADVANCING
IF FUNCTION MOD(i, 5) = 0
DISPLAY SPACE
EXIT PERFORM CYCLE
END-IF
DISPLAY ", " WITH NO ADVANCING
END-PERFORM
GOBACK
.

View file

@ -0,0 +1,8 @@
for i in 1..10 {
write(i);
if i % 5 == 0 then {
writeln();
continue;
}
write(", ");
}

View file

@ -1,6 +1,6 @@
for int i = 1; i <= 10; ++i
for int i ← 1; i ≤ 10; ++i
write(i)
if i % 5 == 0
if i % 5 æ 0
writeLine()
continue
end

View file

@ -0,0 +1,11 @@
include std\console.e --only for any_key to make running command window easier on windows
for i = 1 to 10 do
if remainder(i,5) = 0 then
printf(1, "%d\n", i)
else
printf(1,"%d, ", i)
continue
end if
end for
any_key()

View file

@ -0,0 +1,18 @@
include std\console.e --only for any_key to make running command window easier on windows
for i = 1 to 10 do
if remainder(i,5) = 0 then
switch i do
case 10 then
printf(1,"%d ",i)
break --new to euphoria 4.0.0+
case else
printf(1,"%d\n", i)
end switch
else
printf(1,"%d, ", i)
continue --new to euphoria 4.0.0+
end if
end for
any_key()

View file

@ -0,0 +1,8 @@
for (i in 1...11) {
Sys.print(i);
if (i % 5 == 0) {
Sys.print('\n');
continue;
}
Sys.print(', ');
}

View file

@ -0,0 +1,5 @@
for (i = 1; i < 11; i++) {
print i
println and continue if i % 5 == 0
print ", "
}

View file

@ -0,0 +1,9 @@
MODULE LoopsContinue;
IMPORT Out;
VAR i : INTEGER;
BEGIN
FOR i := 1 TO 10 DO
Out.Int( i, 0 );
IF i # 5 THEN Out.String( ", " ) ELSE Out.Ln END
END
END LoopsContinue.

View file

@ -0,0 +1,8 @@
for ($i = 1; $i -le 10; $i++) {
Write-Host -NoNewline $i
if ($i % 5 -eq 0) {
Write-Host
continue
}
Write-Host -NoNewline ", "
}

View file

@ -0,0 +1,20 @@
REBOL [
Title: "Loop/Continue"
URL: http://rosettacode.org/wiki/Loop/Continue
]
; REBOL2 does not provide a 'continue' word for loop constructs,
; however, you may not even miss it:
print "One liner (compare to ALGOL 68 solution):"
repeat i 10 [prin rejoin [i either 0 = mod i 5 [crlf][", "]]]
print [crlf "Port of ADA solution:"]
for i 1 10 1 [
prin i
either 0 = mod i 5 [
prin newline
][
prin ", "
]
]

View file

@ -0,0 +1,8 @@
repeat i 10 [
prin i
if zero? i % 5 [
prin newline
continue
]
prin ", "
]