Need a data structure example.. 
Author Message
 Need a data structure example..

I am very very new to the Smalltalk language but I am slowly starting to
grasp the organization and concepts of the language.  I have been looking
for a good easy to understand source code example of a "que" data structure.
I have looked in several texts but cannot seem to locate one. I would deeply
appreciate it if someone would provide me with such an example.

Thank you,
Scott
^  Send e-mail to:
^


^
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
^
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^



Mon, 28 Apr 1997 12:33:36 GMT  
 Need a data structure example..

Quote:
>I am very very new to the smalltalk language...  I have been looking
>for a good easy to understand source code example of a "que" data structure.

OrderedCollection can behave like a queue or a stack,
etc. by restricting which messages you send to the instance.

Here is some code showing queue-like behavior...

(OrderedCollection  new: 3)
    addLast: 1;
    addLast: 2;
    addLast: 3;
    yourself

=> OrderedCollection(1 2 3)

(OrderedCollection  new: 3)
    addLast: 1;
    addLast: 2;
    addLast: 3;
    removeFirst

=> 1


Intel ProShare Teleconferencing
(503) 696-9309 FAX: (503) 696-4210



Wed, 30 Apr 1997 01:31:53 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Event case loses connection to data structure when data structure is modified

2. GOBO data structure library vs other data structure libraries

3. Example of OSI package/data structure?

4. data structures in COBOL, examples?

5. Need Help With Data Aquisition and Window Structure

6. NEEDED: data base structure for artificial neural network

7. Need suggestions for Data Structures book.

8. need help with data structure problem

9. HELP: I need a example of how pass Excel Data to Fivewin program

10. Newby needs examples of c programs with tk data entry screens

11. Losing data on data structure change

12. data structures versus data bases???

 

 
Powered by phpBB® Forum Software