annotate lab1/repeat.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/repeat.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 i := 0;
Mike Spivey <mike@cs.ox.ac.uk>
parents:
diff changeset
5 repeat
Mike Spivey <mike@cs.ox.ac.uk>
parents:
diff changeset
6 i := i + 1;
Mike Spivey <mike@cs.ox.ac.uk>
parents:
diff changeset
7 i := i * i;
Mike Spivey <mike@cs.ox.ac.uk>
parents:
diff changeset
8 print i; newline
Mike Spivey <mike@cs.ox.ac.uk>
parents:
diff changeset
9 until i mod 5 = 0
Mike Spivey <mike@cs.ox.ac.uk>
parents:
diff changeset
10 end.
Mike Spivey <mike@cs.ox.ac.uk>
parents:
diff changeset
11
Mike Spivey <mike@cs.ox.ac.uk>
parents:
diff changeset
12 (*<<
Mike Spivey <mike@cs.ox.ac.uk>
parents:
diff changeset
13 1
Mike Spivey <mike@cs.ox.ac.uk>
parents:
diff changeset
14 4
Mike Spivey <mike@cs.ox.ac.uk>
parents:
diff changeset
15 25
Mike Spivey <mike@cs.ox.ac.uk>
parents:
diff changeset
16 >>*)