September 2017 Update
This commit is contained in:
parent
bba7bfd280
commit
ba8067c3b7
14570 changed files with 153136 additions and 63871 deletions
|
|
@ -0,0 +1,5 @@
|
|||
BEGIN
|
||||
INTEGER I;
|
||||
FOR I := 1 STEP 3 UNTIL 19 DO
|
||||
WRITE( I );
|
||||
END
|
||||
|
|
@ -1 +0,0 @@
|
|||
type Loop_Steps is (2, 4, 6, 8);
|
||||
|
|
@ -1,5 +0,0 @@
|
|||
for Step in Loop_Steps loop
|
||||
put(Step, 0);
|
||||
put(", ");
|
||||
end loop;
|
||||
put("who do we appreciate?");
|
||||
|
|
@ -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""?");
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
for i from 2 to 8 by 2 do
|
||||
print( i )
|
||||
od
|
||||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -0,0 +1,4 @@
|
|||
for i = 2 to 8 step 2
|
||||
print i; ", ";
|
||||
next i
|
||||
print "who do we appreciate?"
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
FOR n = 2 TO 8 STEP 2
|
||||
PRINT n & "..";
|
||||
NEXT n
|
||||
PRINT "who do we appreciate?"
|
||||
END
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
10 FOR I = 1 TO 10 STEP 2
|
||||
20 PRINT I
|
||||
30 NEXT
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
for (i = 2; i <= 10; i += 2) {
|
||||
i
|
||||
}
|
||||
|
|
@ -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.
|
||||
].
|
||||
|
|
|
|||
|
|
@ -0,0 +1,8 @@
|
|||
Public Sub Main()
|
||||
Dim siCount As Short
|
||||
|
||||
For siCount = 1 To 50 Step 5
|
||||
Print "Gambas is great!"
|
||||
Next
|
||||
|
||||
End
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
U8 i;
|
||||
for (i = 1; i < 10; i += 2)
|
||||
Print("%d\n", i);
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
// version 1.0.6
|
||||
|
||||
fun main(args: Array<String>) {
|
||||
for (i in 1 .. 21 step 2) print("$i ")
|
||||
}
|
||||
|
|
@ -1 +0,0 @@
|
|||
for x in countdown(10,0,3): echo(x)
|
||||
|
|
@ -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:
|
||||
|
|
@ -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)'
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
> n, 1..10,2
|
||||
#.output(n)
|
||||
<
|
||||
|
|
@ -1,3 +1 @@
|
|||
for (i <- 2 to 8 by 2) {
|
||||
println(i)
|
||||
}
|
||||
for (i <- 2 to 8 by 2) println(i)
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -0,0 +1,9 @@
|
|||
forvalues i=1(2)10 {
|
||||
display "`i'"
|
||||
}
|
||||
|
||||
1
|
||||
3
|
||||
5
|
||||
7
|
||||
9
|
||||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -0,0 +1,2 @@
|
|||
foreach n in ([1..10,4]) {println(n)}
|
||||
[1..10,3].pump(Console.println)
|
||||
|
|
@ -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})
|
||||
Loading…
Add table
Add a link
Reference in a new issue