Sync
This commit is contained in:
parent
6f050a029e
commit
776bba907c
3887 changed files with 59894 additions and 7280 deletions
22
Task/Queue-Usage/Component-Pascal/queue-usage.component
Normal file
22
Task/Queue-Usage/Component-Pascal/queue-usage.component
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
MODULE UseQueue;
|
||||
IMPORT StdLog,Queue,Boxes;
|
||||
|
||||
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
|
||||
END Do;
|
||||
END UseQueue.
|
||||
Loading…
Add table
Add a link
Reference in a new issue