Short: A queue & stack for Amiga E, v2. Author: jvanriper@uncavx.unca.edu Uploader: jvanriper uncavx unca edu Type: dev/e Architecture: m68k-amigaos Long: QueueStack v2.0, from the Cheese Olfactory Workshop (written by Trey Van Riper) for Amiga E 3.1. It's designed to act as both a stack and a queue. In fact, you could change your mind in the middle of either adding or getting objects into the queuestack to make it act as a stackqueue.. or whatever. You can put anything into the queuestack.. in fact, you could put varying types of data in the queuestack (of course, you'll have to figure out what you put in it yourself). Thanks go to Amiga E as a typeless language. This second version adds a tremendous amount of functionality to the queuestack in letting you iterate through it. As a result, procFrontToBack/procBackToFront() have been deleted, in favor of some slightly more useful phrases (inject/injectBackwards). This second version also allows you to enter '0' as an item, if you provide another value that can be used as a replacement instead. Unfortunately, queuestack needs some means by which it can determine a non-valid item in order to perform certain tests. In the first version, '0' was that value, however, this prevented '0' from being a value that could be used in the queuestack (say, if you were working with strictly integers or something). Now you may determine what constitutes a non-valid item (say, you don't expect to have any integers of a value -1, then you could use -1). Here's a cut-down ShowModule output: --------------------------------------------------------------------- ShowModule v1.9 (c) 1992 $#%! now showing: "queuestack.m" NOTE: don't use this output in your code, use the module instead. /* this module contains 5496 bytes of code! */ /* ... and 56 reloc entries */ DEF queuestack_ctrlc /* 2 private global variable(s) in this module */ (---) OBJECT queuestack new(a,b) addFirst(a) addLast(a) getFirst() getLast() getSize() addFirstQS(a) addLastQS(a) inject(a,b) injectBackwards(a,b) do(a) doBackwards(a) collect(a) collectBackwards(a) conform(a) detect(a) detectBackwards(a) reject(a) rejectBackwards(a) select(a) selectBackwards(a) asList() asListBackwards() asQueueStack(a) asQueueStackBackwards(a) kill() end() (---) ENDOBJECT /* SIZEOF=20 */ ---------------------------------------------------------------------