Hi,
Are there any data structures in pascal that I could use for data sorting/removal/access
Printable View
Hi,
Are there any data structures in pascal that I could use for data sorting/removal/access
I thought we only support arrays in pascal script. not sure though.
You could use lists too, no?
flat style databases, there are a bunch used for different scripts.. MSI uses these types for your accounts and which script they're on and what settings etc
yea this is MSI'sCode:[Main]
Running=True
Changed=False
Name=MSI Pheonix
[Players]
HowMany=1
Integers=4
Strings=0
Booleans=1
[Integers]
0=Total Loads
1=Break Loads
2=Total Time
3=Break Time
[Booleans]
0=Member
[Strings]
(0)HowMany=0
[0]
User=
Pass=
Pin=
Integer0=100
Integer1=45
Integer2=300
Integer3=60
Boolean0=True
Active=True
It's pretty much for my building detection script- I am trying to determine if I am being surrounded by white walls. Do note that while others suggested floor colors, it clashes with the road colors too often
That's not easy at all -_-. The problem is not storing the data, but looking for gaps. http://villavu.com/forum/showthread.php?t=75882
There are multiple ways to sort an array. QuickSort is one (for sorting integer arrays in ascending order). And QuickTPASort, SortCircleWise, SortTPAFrom, etc, for TPAs :) See http://docs.villavu.com/simba/scriptref/tpa.html for more details and help :)
To make a hash map you could just use a 2D array, with one dimension not having explicit bounds, and the second having 2 ([0..1]). I assume you're coming from Java? In which case, there really isn't anything as dynamic and customisable as lists, but you can have inexplicit arrays, and then add one length to the array each time you're adding a value. You could easily make a method to do that.