Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DarkBASIC Professional Discussion / How to use List, Queue, and Stack in DBpro

Author
Message
Bulleyes
21
Years of Service
User Offline
Joined: 3rd Nov 2002
Location: Cyberjaya, Malaysia
Posted: 10th Dec 2002 16:13
Here might be a little dumb question. But can anyone teach me how to use the list, queue, and stack function in DBpro. Any code snippets demonstrating pushing and popping items in stack and queue, iterating the items in a list, will be useful to me.

Thanks!
Bad Nose Entertainment - Where games are forged from the flames of talent and passion.

http://www.badnose.com/
swdave
21
Years of Service
User Offline
Joined: 6th Oct 2002
Location: United States
Posted: 11th Dec 2002 10:31
Here is some samples. Maybe they can be added to the help docs. First thing is to be carefull with array index 0, every array has one or maybe not. Basically these commands allow you to create dynamic arrays with different methods to access them. You can use the array,list,queue,stack commands all on the same array depending how you want to process the array. So you can create a list then process it as a stack and use it as an array all at the same time. The usage seemed bulky to me at first because you need to create a blank and then set the value but I believe this is because you can have array of types and thus need to fill in multiple values. Use this queue sample if you need a function that handles variable amount of parameters.








Bulleyes
21
Years of Service
User Offline
Joined: 3rd Nov 2002
Location: Cyberjaya, Malaysia
Posted: 11th Dec 2002 14:55
Cool... I will try to understand that. Thanks a lot pal.

Bad Nose Entertainment - Where games are forged from the flames of talent and passion.

http://www.badnose.com/

Login to post a reply

Server time is: 2024-05-07 20:27:13
Your offset time is: 2024-05-07 20:27:13