DI-159 PLC Hardware Manual
StickOS
>
20 while 1 do
>
30 if a==10 then
>
40 break
>
50 endif
>
60 let sum = 0
>
70 for b = 0 to a
>
80 let sum = sum+b
>
90 next
>
100 print "sum of integers 0 thru", a, "is", sum
>
110 let a = a+1
>
120 endwhile
>
run
sum of integers 0 thru 0 is 0
sum of integers 0 thru 1 is 1
sum of integers 0 thru 2 is 3
sum of integers 0 thru 3 is 6
sum of integers 0 thru 4 is 10
sum of integers 0 thru 5 is 15
sum of integers 0 thru 6 is 21
sum of integers 0 thru 7 is 28
sum of integers 0 thru 8 is 36
sum of integers 0 thru 9 is 45
> _
54
Summary of Contents for DI-159
Page 51: ...StickOS DI 159 PLC Hardware Manual 4 is even _ 51...
Page 76: ...DI 159 Block Diagram 76...
Page 77: ...Dimensional Drawing 77...