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
mike@0 1 (* lab1/loop.p *)
mike@0 2
mike@0 3 begin
mike@0 4 x := 12345;
mike@0 5 i := 1;
mike@0 6 loop
mike@0 7 print i; newline;
mike@0 8 j := 2 * i;
mike@0 9 if j > x then exit end;
mike@0 10 i := j
mike@0 11 end
mike@0 12 end.
mike@0 13
mike@0 14 (*<<
mike@0 15 1
mike@0 16 2
mike@0 17 4
mike@0 18 8
mike@0 19 16
mike@0 20 32
mike@0 21 64
mike@0 22 128
mike@0 23 256
mike@0 24 512
mike@0 25 1024
mike@0 26 2048
mike@0 27 4096
mike@0 28 8192
mike@0 29 >>*)