SA-MP Forums Archive
[Include] Linked lists in PAWN - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Filterscripts (https://sampforum.blast.hk/forumdisplay.php?fid=17)
+---- Forum: Includes (https://sampforum.blast.hk/forumdisplay.php?fid=83)
+---- Thread: [Include] Linked lists in PAWN (/showthread.php?tid=451962)

Pages: 1 2


Re: AW: Linked lists in PAWN - wups - 19.10.2013

Quote:
Originally Posted by BigETI
Посмотреть сообщение
It's actually possible to created nested lists. Maybe I should write a tutorial about it... :/
If you're answering that to me, It's not what i meant.
List:
pawn Код:
push(1);
push(2);
push(3);
pop(); // returns 1
pop(); // returns 2
pop(); // returns 3
Stack:
pawn Код:
push(1);
push(2);
push(3);
pop(); // returns 3
pop(); // returns 2
pop(); // returns 1



AW: Re: AW: Linked lists in PAWN - BigETI - 19.10.2013

Quote:
Originally Posted by wups
Посмотреть сообщение
If you're answering that to me, It's not what i meant.
List:
pawn Код:
push(1);
push(2);
push(3);
pop(); // returns 1
pop(); // returns 2
pop(); // returns 3
Stack:
pawn Код:
push(1);
push(2);
push(3);
pop(); // returns 3
pop(); // returns 2
pop(); // returns 1
I was confused for some seconds. You probably mean the way the data types are removing their nodes/items. A linked list can exactly be used as a stack aswell. You can basicly add a node at the end using LIST::push_back(), and LIST::pop_back() to remove the last created node.




Re: Linked lists in PAWN - TheChimpJr - 19.10.2013

Nice mate!


Re: Linked lists in PAWN - BigETI - 25.11.2017

This release is obsolete. I recommend to switch to https://sampforum.blast.hk/showthread.php?tid=645193