/* script to test the REXX interpreter API ****************/

value_back = ''

new_queue = rxqueue('create', 'test_queue')
old_queue = rxqueue('set', new_queue)

address ksh 'ls -al | rxqueue' new_queue

say 'Object REXX has queued the filenames of the actual directory'
say 'in the queue ' new_queue'. Number of Elements in the queue: ' queued()

do while queued() > 0
   parse pull element
   value_back = value_back || '0A'x || element
end

call rxqueue 'delete', new_queue
call rxqueue 'set', old_queue

exit value_back

