September Morn Update

This commit is contained in:
Ingy döt Net 2019-09-12 10:33:56 -07:00
parent 4e2d22a71d
commit aac6731f2c
6856 changed files with 141342 additions and 21127 deletions

View file

@ -1,22 +1,23 @@
MODULE UseQueue;
IMPORT StdLog,Queue,Boxes;
IMPORT
Queue,
Boxes,
StdLog;
PROCEDURE Do*;
VAR
q: Queue.Queue;
o: Boxes.Object;
BEGIN
q := Queue.NewQueue(6);
q.Push(Boxes.NewInteger(1));
q.Push(Boxes.NewInteger(2));
q.Push(Boxes.NewInteger(3));
o := q.Pop();
o := q.Pop();
q.Push(Boxes.NewInteger(4));
o := q.Pop();
o := q.Pop();
q.Push(Boxes.NewInteger(5));
o := q.Pop();
StdLog.String("Is empty: ");StdLog.Bool(q.IsEmpty());StdLog.Ln
q: Queue.Instance;
b: Boxes.Box;
BEGIN
q := Queue.New(10);
q.Push(Boxes.NewInteger(1));
q.Push(Boxes.NewInteger(2));
q.Push(Boxes.NewInteger(3));
b := q.Pop();
b := q.Pop();
q.Push(Boxes.NewInteger(4));
b := q.Pop();
b := q.Pop();
StdLog.String("Is empty:> ");StdLog.Bool(q.IsEmpty());StdLog.Ln
END Do;
END UseQueue.