September 2017 Update

This commit is contained in:
Ingy döt Net 2017-09-23 10:01:46 +02:00
parent bba7bfd280
commit ba8067c3b7
14570 changed files with 153136 additions and 63871 deletions

View file

@ -0,0 +1,5 @@
BEGIN
INTEGER I;
FOR I := 1 STEP 3 UNTIL 19 DO
WRITE( I );
END

View file

@ -1 +0,0 @@
type Loop_Steps is (2, 4, 6, 8);

View file

@ -1,5 +0,0 @@
for Step in Loop_Steps loop
put(Step, 0);
put(", ");
end loop;
put("who do we appreciate?");

View file

@ -1,7 +0,0 @@
for Value in 3 .. 12 loop
if Value mod 3 = 0 then
put(Value, 0);
put(", ")
end if;
end loop;
put("what's a word that rhymes with ""twelve""?");

View file

@ -0,0 +1,3 @@
for i from 2 to 8 by 2 do
print( i )
od

View file

@ -1,4 +1,3 @@
for i = 2 to 8 step 2
print i; ", ";
next i
print "who do we appreciate?"
FOR i = 1 TO 10 STEP 2
PRINT i
NEXT

View file

@ -0,0 +1,4 @@
for i = 2 to 8 step 2
print i; ", ";
next i
print "who do we appreciate?"

View file

@ -0,0 +1,5 @@
FOR n = 2 TO 8 STEP 2
PRINT n & "..";
NEXT n
PRINT "who do we appreciate?"
END

View file

@ -0,0 +1,3 @@
10 FOR I = 1 TO 10 STEP 2
20 PRINT I
30 NEXT

View file

@ -0,0 +1,3 @@
for (i = 2; i <= 10; i += 2) {
i
}

View file

@ -1,9 +1,8 @@
#import system.
#import extensions.
import extensions.
#symbol program =
program =
[
2 to:8 &by:2 &doEach:i
2 to:8 by:2 do(:i)
[
console writeLine:i.
].

View file

@ -0,0 +1,8 @@
Public Sub Main()
Dim siCount As Short
For siCount = 1 To 50 Step 5
Print "Gambas is great!"
Next
End

View file

@ -0,0 +1,3 @@
U8 i;
for (i = 1; i < 10; i += 2)
Print("%d\n", i);

View file

@ -0,0 +1,5 @@
// version 1.0.6
fun main(args: Array<String>) {
for (i in 1 .. 21 step 2) print("$i ")
}

View file

@ -1 +0,0 @@
for x in countdown(10,0,3): echo(x)

View file

@ -0,0 +1,7 @@
R : Prints the odd numbers less than 10.
C :i = 1
*Loop
T :#i
C :i = i + 2
J ( i < 10 ) :*Loop
END:

View file

@ -0,0 +1,4 @@
Do v=1 by 3/2 While v**2<30
Say v
End
Say '('v'**2) is greater than 30 (30.25)'

View file

@ -0,0 +1,3 @@
> n, 1..10,2
#.output(n)
<

View file

@ -1,3 +1 @@
for (i <- 2 to 8 by 2) {
println(i)
}
for (i <- 2 to 8 by 2) println(i)

View file

@ -1,4 +1,4 @@
BEGIN
INTEGER i;
FOR i:=5 UNTIL 25 STEP 5 DO OutInt(i,5)
END
begin
integer i;
for i:=5 step 5 until 25 do outint(i,5)
end

View file

@ -0,0 +1,9 @@
forvalues i=1(2)10 {
display "`i'"
}
1
3
5
7
9

View file

@ -1,5 +1,5 @@
buffer=""
For i = 2 To 8 Step 2
buffer=buffer & i & " "
Next
wscript.echo buffer
buffer = ""
For i = 2 To 8 Step 2
buffer = buffer & i & " "
Next
WScript.Echo buffer

View file

@ -0,0 +1,2 @@
foreach n in ([1..10,4]) {println(n)}
[1..10,3].pump(Console.println)

View file

@ -0,0 +1,2 @@
fcn loop(i=0){println(i); if(i<10)return(self.fcn(i+2))}
(0).pump(10,Console.println,fcn(n){if(n%2)return(Void.Skip); n})