Initial data commit
This commit is contained in:
parent
72d218235f
commit
f23f22d71c
199087 changed files with 3378941 additions and 0 deletions
|
|
@ -0,0 +1,28 @@
|
|||
window 1, @"Loops with Ranges", ( 0, 0, 400, 400 )
|
||||
|
||||
begin globals
|
||||
NSInteger sum = 0
|
||||
float prod = 1
|
||||
end globals
|
||||
|
||||
local fn process( x as float )
|
||||
sum += abs(x)
|
||||
if abs(prod) < (2 ^ 27) and x <> 0 then prod = prod * x
|
||||
end fn
|
||||
|
||||
NSInteger j
|
||||
NSInteger x = 5, y = -5, z = -2
|
||||
NSInteger one = 1, three = 3, seven = 7
|
||||
|
||||
for j = -three to (3 ^ 3) step three: fn process(j): next j
|
||||
for j = -seven to seven step x: fn process(j): next j
|
||||
for j = 555 to 550 - y: fn process(j): next j
|
||||
for j = 22 to -28 step -three: fn process(j): next j
|
||||
for j = 1927 to 1939: fn process(j): next j
|
||||
for j = x to y step z: fn process(j): next j
|
||||
for j = (11 ^ x) to (11 ^ x) + one: fn process(j): next j
|
||||
|
||||
print using " sum = ###,###"; sum
|
||||
print using "prod =-####,###,###"; prod
|
||||
|
||||
HandleEvents
|
||||
Loading…
Add table
Add a link
Reference in a new issue