diff options
Diffstat (limited to 'examples')
-rw-r--r-- | examples/global-loop.ph (renamed from examples/ok-loop-huge.ph) | 0 | ||||
-rw-r--r-- | examples/local-loop.ph | 12 |
2 files changed, 12 insertions, 0 deletions
diff --git a/examples/ok-loop-huge.ph b/examples/global-loop.ph index 2381537..2381537 100644 --- a/examples/ok-loop-huge.ph +++ b/examples/global-loop.ph diff --git a/examples/local-loop.ph b/examples/local-loop.ph new file mode 100644 index 0000000..2b7d870 --- /dev/null +++ b/examples/local-loop.ph @@ -0,0 +1,12 @@ +procedure SUM{num[int]} return int +var sum = 0 +var idx = 0 +is + do + sum = sum + idx, + idx = idx + 1 + until idx = num, + return sum +end procedure + +print SUM(1000000001) |