YAPC::EU 2018 Glasgow Update!
This commit is contained in:
parent
22f33d4004
commit
4e2d22a71d
1170 changed files with 15042 additions and 3047 deletions
19
Task/Queue-Definition/Ring/queue-definition.ring
Normal file
19
Task/Queue-Definition/Ring/queue-definition.ring
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
# Project : Queue/Definition
|
||||
|
||||
load "stdlib.ring"
|
||||
oQueue = new Queue
|
||||
for n = 5 to 7
|
||||
see "Push: " + n + nl
|
||||
oQueue.add(n)
|
||||
next
|
||||
see "Pop: " + oQueue.remove() + nl
|
||||
see "Push: 8" + nl
|
||||
oQueue.add(8)
|
||||
see "Pop: " + oQueue.remove() + nl
|
||||
see "Pop: " + oQueue.remove() + nl
|
||||
see "Pop: " + oQueue.remove() + nl
|
||||
if len(oQueue) != 0
|
||||
oQueue.print()
|
||||
else
|
||||
see "Error: queue is empty" + nl
|
||||
ok
|
||||
Loading…
Add table
Add a link
Reference in a new issue