Just another update

This commit is contained in:
Ingy döt Net 2015-02-20 00:35:01 -05:00
parent a25938f123
commit 00a190b0a6
6591 changed files with 94363 additions and 23227 deletions

View file

@ -1,18 +1,18 @@
/*REXX program demonstrates three queue operations: push, pop, queued. */
say 'Pushing five values to the stack.'
/*REXX program demonstrates three queue operations: push, pop, empty. */
say ' Pushing five values to the stack.'
do j=1 for 4 /*loop to PUSH four values. */
call push j*10 /*PUSH (aka enqueue to stack). */
say 'pushed value:' j*10 /*echo the pushed value. */
if j\==3 then iterate /*also, insert a "null" entry. */
call push /*PUSH (aka enqueue to stack). */
if j\==3 then iterate /*also, insert a "null" entry. */
call push /*PUSH (aka enqueue to stack). */
say 'pushed a "null" value.' /*echo what was pushed. */
end /*j*/
say 'Popping all values from the stack.'
say ' Popping all values from the stack.'
do m=1 while \empty() /*EMPTY (returns TRUE if empty). */
call pop /*POP (aka dequeue from stack).*/
say m': popped value=' result /*echo the popped value. */
end /*m*/
say 'The stack is now empty.'
say ' The stack is now empty.'
exit /*stick a fork in it, we're done.*/
/*──────────────────────────────────subroutines/functions/operators. */
push: queue arg(1); return /*REXX QUEUE is FIFO. */