Just another update

This commit is contained in:
Ingy döt Net 2015-02-20 00:35:01 -05:00
parent a25938f123
commit 00a190b0a6
6591 changed files with 94363 additions and 23227 deletions

View file

@ -1 +1 @@
Demonstrate a for loop where the step value is greater than one.
Demonstrate a for-loop where the step-value is greater than one.

View file

@ -1,2 +1,4 @@
---
category:
- Simple
note: Iteration

View file

@ -1,6 +1,6 @@
BEGIN {
for (l= 2; l <= 8; l = l + 2) {
print l
for (i= 2; i <= 8; i = i + 2) {
print i
}
print "Ain't never to late!"
print "Ain't never too late!"
}

View file

@ -0,0 +1,3 @@
<cfloop from="0" to="99" step="3" index="i">
<Cfoutput>#i#</Cfoutput>
</cfloop>

View file

@ -0,0 +1 @@
thru=: <./ + i.@(+*)@-~

View file

@ -0,0 +1,6 @@
(#~ 0 = 2&|) 1 thru 20
2 4 6 8 10 12 14 16 18 20
(#~ 0 = 3&|) 1 thru 20
3 6 9 12 15 18
(#~ 1 = 3&|) 1 thru 20
1 4 7 10 13 16 19

View file

@ -0,0 +1,2 @@
(#~ 1&p:) 1 thru 20
2 3 5 7 11 13 17 19

View file

@ -0,0 +1 @@
for i = 0 to 10 by 2 do format "%\n" i

View file

@ -0,0 +1,7 @@
0
2
4
6
8
10
OK

View file

@ -0,0 +1,2 @@
(for (i 0 10 2)
(println i))

View file

@ -0,0 +1,14 @@
MODULE LoopForStep;
IMPORT
Out;
VAR
i: INTEGER;
BEGIN
FOR i := 0 TO 10 BY 3 DO
Out.LongInt(i,0);Out.Ln
END;
FOR i := 10 TO 0 BY -3 DO
Out.LongInt(i,0);Out.Ln
END
END LoopForStep.

View file

@ -0,0 +1,4 @@
for(%i = 0; %i < 201; %i += 2)
{
echo(%i);
}

View file

@ -0,0 +1,3 @@
for i in range(2, 10, 2)
echo i
endfor