Product SiteDocumentation Site

5.3.8.8. push


>>-push(item-+------------+)-----------------------------------><
             +--,option---+

Makes the object item a member item of the circular queue, inserting the item object in front of the first item in the queue. The pushed item object will be the new first item in the circular queue.
If the circular queue is full, then the last item stored in the circular queue will be deleted, before the insertion takes place. In this case the deleted item will be returned, otherwise .nil.
If option is specified, it may be "Normal" or "Unique". The default is "Normal". Only the capitalized letter is needed; all characters following it are ignored. If option is 'Unique', any matching items already in the queue will be removed before item is added to the queue. This allows you to maintain a list like the recent files list of an editor.