langs a-z

This commit is contained in:
Ingy döt Net 2013-04-10 22:43:41 -07:00
parent db842d013d
commit d066446780
11389 changed files with 98361 additions and 1020 deletions

View file

@ -0,0 +1 @@
for (i = 2; i <= 8; i +=2)

View file

@ -0,0 +1 @@
foreach (i in [2, 4 .. 8])

View file

@ -0,0 +1,10 @@
/* NetRexx */
options replace format comments java crossref savelog symbols nobinary
say
say 'Loops/For with a specified step'
loop i_ = -1.4 to 10.6 by 1.7
say i_.format(3, 1) || '\0'
end i_
say

View file

@ -0,0 +1,18 @@
# let for_step a b step fn =
let rec aux i =
if i <= b then begin
fn i;
aux (i+step)
end
in
aux a
;;
val for_step : int -> int -> int -> (int -> 'a) -> unit = <fun>
# for_step 0 8 2 (fun i -> Printf.printf " %d\n" i) ;;
0
2
4
6
8
- : unit = ()

View file

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

View file

@ -0,0 +1,3 @@
for i = 1:2:10
disp(i)
endfor

View file

@ -0,0 +1,6 @@
/* Loop from 3 to 9 in steps of 2 */
for ( l = [3:2:9] ) {
echo (l);
}
echo ("on a double white line.");

View file

@ -0,0 +1,4 @@
for I in 2..8;2 do
{System.show I}
end
{System.show done}

View file

@ -0,0 +1 @@
forstep(n=1,10,2,print(n))

View file

@ -0,0 +1 @@
forstep(n=1,100,[2,4,2,2],print(n))

View file

@ -0,0 +1,6 @@
declare (n, i) fixed binary;
get list (n);
do i = 1 to n by 4;
put skip list (i);
end;

View file

@ -0,0 +1,5 @@
for 2, 4 ... 8 {
print "$_, ";
}
say 'whom do we appreciate?';

View file

@ -0,0 +1,5 @@
int main() {
for(int i = 2; i <= 16; i=i+2) {
write(i + "\n");
}
}

View file

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

View file

@ -0,0 +1,3 @@
For i=-15 To 25 Step 5
Debug i
Next i

View file

@ -0,0 +1,3 @@
for i 2 8 2 [
prin rejoin [i ", "]]
print "who do we appreciate?"

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 @@
data _null_;
do i=1 to 10 by 2;
put i;
end;
run;

View file

@ -0,0 +1,3 @@
for (x; 2; x <= 8; 2)
print(x, ", ");;
print("who do we appreciate?\n");

View file

@ -0,0 +1,10 @@
$ include "seed7_05.s7i";
const proc: main is func
local
var integer: number is 0;
begin
for number range 1 to 10 step 2 do
writeln(number);
end for;
end func;

View file

@ -0,0 +1,2 @@
2 to: 8 by: 2 do: [| :i | Console ; i printString ; ', '].
inform: 'enough with the cheering already!'.

View file

@ -0,0 +1,4 @@
Local i
For i, 0, 100, 5
Disp i
EndFor

View file

@ -0,0 +1,4 @@
$$ MODE TUSCRIPT
LOOP i=2,9,2
PRINT i
ENDLOOP

View file

@ -0,0 +1,5 @@
x=2
while test $x -le 8; do
echo $x
x=`expr $x + 2` || exit $?
done

View file

@ -0,0 +1 @@
for x in `jot - 2 8 2`; do echo $x; done

View file

@ -0,0 +1,3 @@
for (( x=2; $x<=8; x=$x+2 )); do
printf "%d, " $x
done

View file

@ -0,0 +1,3 @@
foreach x (`jot - 2 8 2`)
echo $x
end

View file

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

View file

@ -0,0 +1,3 @@
for(i = 2, i <= 8, i = i + 2){
i.print()
}

View file

@ -0,0 +1,8 @@
include c:\cxpl\codes;
int I;
[for I:= 2 to 8 do
[IntOut(0, I); Text(0, ", ");
I:= I+1;
];
Text(0, "who do we appreciate?");
]

View file

@ -0,0 +1,4 @@
10 FOR l = 2 TO 8 STEP 2
20 PRINT l; ", ";
30 NEXT l
40 PRINT "Who do we appreciate?"