annotate lab1/loop.p @ 1:b5139af1a420 tip basis

Fixed permissions on compile scripts
author Mike Spivey <mike@cs.ox.ac.uk>
date Fri, 13 Oct 2017 17:27:58 +0100
parents bfdcc3820b32
children
rev   line source
0
Mike Spivey <mike@cs.ox.ac.uk>
parents:
diff changeset
1 (* lab1/loop.p *)
Mike Spivey <mike@cs.ox.ac.uk>
parents:
diff changeset
2
Mike Spivey <mike@cs.ox.ac.uk>
parents:
diff changeset
3 begin
Mike Spivey <mike@cs.ox.ac.uk>
parents:
diff changeset
4 x := 12345;
Mike Spivey <mike@cs.ox.ac.uk>
parents:
diff changeset
5 i := 1;
Mike Spivey <mike@cs.ox.ac.uk>
parents:
diff changeset
6 loop
Mike Spivey <mike@cs.ox.ac.uk>
parents:
diff changeset
7 print i; newline;
Mike Spivey <mike@cs.ox.ac.uk>
parents:
diff changeset
8 j := 2 * i;
Mike Spivey <mike@cs.ox.ac.uk>
parents:
diff changeset
9 if j > x then exit end;
Mike Spivey <mike@cs.ox.ac.uk>
parents:
diff changeset
10 i := j
Mike Spivey <mike@cs.ox.ac.uk>
parents:
diff changeset
11 end
Mike Spivey <mike@cs.ox.ac.uk>
parents:
diff changeset
12 end.
Mike Spivey <mike@cs.ox.ac.uk>
parents:
diff changeset
13
Mike Spivey <mike@cs.ox.ac.uk>
parents:
diff changeset
14 (*<<
Mike Spivey <mike@cs.ox.ac.uk>
parents:
diff changeset
15 1
Mike Spivey <mike@cs.ox.ac.uk>
parents:
diff changeset
16 2
Mike Spivey <mike@cs.ox.ac.uk>
parents:
diff changeset
17 4
Mike Spivey <mike@cs.ox.ac.uk>
parents:
diff changeset
18 8
Mike Spivey <mike@cs.ox.ac.uk>
parents:
diff changeset
19 16
Mike Spivey <mike@cs.ox.ac.uk>
parents:
diff changeset
20 32
Mike Spivey <mike@cs.ox.ac.uk>
parents:
diff changeset
21 64
Mike Spivey <mike@cs.ox.ac.uk>
parents:
diff changeset
22 128
Mike Spivey <mike@cs.ox.ac.uk>
parents:
diff changeset
23 256
Mike Spivey <mike@cs.ox.ac.uk>
parents:
diff changeset
24 512
Mike Spivey <mike@cs.ox.ac.uk>
parents:
diff changeset
25 1024
Mike Spivey <mike@cs.ox.ac.uk>
parents:
diff changeset
26 2048
Mike Spivey <mike@cs.ox.ac.uk>
parents:
diff changeset
27 4096
Mike Spivey <mike@cs.ox.ac.uk>
parents:
diff changeset
28 8192
Mike Spivey <mike@cs.ox.ac.uk>
parents:
diff changeset
29 >>*)