RosettaCodeData/Task/Queue-Definition/MATLAB/queue-definition-3.m

23 lines
243 B
Mathematica
Raw Permalink Normal View History

2013-04-10 23:57:08 -07:00
>> myQueue = FIFOQueue({'hello'})
myQueue =
2014-01-17 05:32:22 +00:00
FIFOQueue
2013-04-10 23:57:08 -07:00
>> push(myQueue,'jello')
>> pop(myQueue)
ans =
hello
>> pop(myQueue)
ans =
jello
>> pop(myQueue)
??? Error using ==> FIFOQueue.FIFOQueue>FIFOQueue.pop at 61
The queue is empty