AminetAminet
Search:
84782 packages online
About
Recent
Browse
Search
Upload
Setup
Services

dev/e/queuestack.lha

Mirror:Random
Showing: ppc-morphos icongeneric icon
No screenshot available
Short:A queue & stack for Amiga E, v2.
Author: jvanriper at uncavx.unca.edu
Uploader:jvanriper uncavx unca edu
Type:dev/e
Architecture:m68k-amigaos
Date:1995-01-28
Download:dev/e/queuestack.lha - View contents
Readme:dev/e/queuestack.readme
Downloads:690

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 */
---------------------------------------------------------------------


Contents of dev/e/queuestack.lha
 PERMSSN    UID  GID    PACKED    SIZE  RATIO     CRC       STAMP          NAME
---------- ----------- ------- ------- ------ ---------- ------------ -------------
[generic]                 4608   13192  34.9% -lh5- 688a Jan 26  1995 example
[generic]                 1799    5659  31.8% -lh5- ae09 Jan 26  1995 example.e
[generic]                 5711   14527  39.3% -lh5- f436 Jan 26  1995 queuestack.doc
[generic]                 1953    7102  27.5% -lh5- 55b1 Jan 27  1995 queuestack.m
---------- ----------- ------- ------- ------ ---------- ------------ -------------
 Total         4 files   14071   40480  34.8%            Jan 28  1995
Page generated in 0.02 seconds
Aminet © 1992-2024 Urban Müller and the Aminet team. Aminet contact address: <aminetaminet net>