Add tasks for all the new languages
This commit is contained in:
parent
9dc3c2bb62
commit
bba7bfd280
13208 changed files with 134745 additions and 0 deletions
10
Task/Loops-Continue/ERRE/loops-continue.erre
Normal file
10
Task/Loops-Continue/ERRE/loops-continue.erre
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
FOR I=1 TO 10 DO
|
||||
PRINT(I;CHR$(29);) ! printing a numeric value leaves a blank after it
|
||||
! chr$(29) delete it.....
|
||||
IF I MOD 5=0 THEN
|
||||
PRINT
|
||||
CONTINUE FOR
|
||||
END IF
|
||||
PRINT(",";)
|
||||
END FOR
|
||||
PRINT
|
||||
12
Task/Loops-Continue/FreeBASIC/loops-continue.freebasic
Normal file
12
Task/Loops-Continue/FreeBASIC/loops-continue.freebasic
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
' FB 1.05.0 Win64
|
||||
For i As Integer = 1 To 10
|
||||
Print Str(i);
|
||||
If i Mod 5 = 0 Then
|
||||
Print
|
||||
Continue For
|
||||
End If
|
||||
Print ", ";
|
||||
Next
|
||||
|
||||
Print
|
||||
Sleep
|
||||
6
Task/Loops-Continue/Lasso/loops-continue.lasso
Normal file
6
Task/Loops-Continue/Lasso/loops-continue.lasso
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
loop(10) => {^
|
||||
loop_count
|
||||
loop_count % 5 ? ', ' | '\r'
|
||||
loop_count < 100 ? loop_continue
|
||||
'Hello, World!' // never gets executed
|
||||
^}
|
||||
10
Task/Loops-Continue/Lingo/loops-continue.lingo
Normal file
10
Task/Loops-Continue/Lingo/loops-continue.lingo
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
str = ""
|
||||
repeat with i = 1 to 10
|
||||
put i after str
|
||||
if i mod 5 = 0 then
|
||||
put RETURN after str
|
||||
next repeat
|
||||
end if
|
||||
put ", " after str
|
||||
end repeat
|
||||
put str
|
||||
5
Task/Loops-Continue/LiveCode/loops-continue.livecode
Normal file
5
Task/Loops-Continue/LiveCode/loops-continue.livecode
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
repeat with n = 1 to 10
|
||||
put n
|
||||
if n is 5 then put return
|
||||
if n < 10 and n is not 5 then put ","
|
||||
end repeat
|
||||
5
Task/Loops-Continue/Nim/loops-continue.nim
Normal file
5
Task/Loops-Continue/Nim/loops-continue.nim
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
for i in 1..10:
|
||||
if i mod 5 == 0:
|
||||
echo i
|
||||
continue
|
||||
stdout.write i, ","
|
||||
6
Task/Loops-Continue/Oforth/loops-continue.oforth
Normal file
6
Task/Loops-Continue/Oforth/loops-continue.oforth
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
: loopCont
|
||||
| i |
|
||||
10 loop: i [
|
||||
i dup print 5 mod ifZero: [ printcr continue ]
|
||||
"," .
|
||||
] ;
|
||||
9
Task/Loops-Continue/Phix/loops-continue.phix
Normal file
9
Task/Loops-Continue/Phix/loops-continue.phix
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
for i=1 to 10 do
|
||||
printf(1,"%d", i)
|
||||
if remainder(i,5)=0 then
|
||||
printf(1, "\n")
|
||||
continue
|
||||
end if
|
||||
printf(1,", ")
|
||||
end for
|
||||
{} = wait_key()
|
||||
8
Task/Loops-Continue/Ring/loops-continue.ring
Normal file
8
Task/Loops-Continue/Ring/loops-continue.ring
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
for i = 1 TO 10
|
||||
see i
|
||||
if i % 5 = 0
|
||||
see nl
|
||||
loop
|
||||
ok
|
||||
see ", "
|
||||
next
|
||||
8
Task/Loops-Continue/Sidef/loops-continue.sidef
Normal file
8
Task/Loops-Continue/Sidef/loops-continue.sidef
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
for i in (1..10) {
|
||||
print i
|
||||
if (i %% 5) {
|
||||
print "\n"
|
||||
next
|
||||
}
|
||||
print ', '
|
||||
}
|
||||
8
Task/Loops-Continue/Swift/loops-continue.swift
Normal file
8
Task/Loops-Continue/Swift/loops-continue.swift
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
for i in 1...10 {
|
||||
print(i)
|
||||
if i%5 == 0 {
|
||||
println()
|
||||
continue
|
||||
}
|
||||
print(", ")
|
||||
}
|
||||
8
Task/Loops-Continue/Ursa/loops-continue.ursa
Normal file
8
Task/Loops-Continue/Ursa/loops-continue.ursa
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
decl int i
|
||||
for (set i 1) (< i 11) (inc i)
|
||||
if (= (mod i 5) 0)
|
||||
out i endl console
|
||||
continue
|
||||
end if
|
||||
out i ", " console
|
||||
end for
|
||||
2
Task/Loops-Continue/jq/loops-continue.jq
Normal file
2
Task/Loops-Continue/jq/loops-continue.jq
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
reduce range(1;11) as $i
|
||||
(""; . + "\($i)" + (if $i % 5 == 0 then "\n" else ", " end))
|
||||
Loading…
Add table
Add a link
Reference in a new issue