Anyway, just wanted to add that to the stack of feature requests
[Implemented] Associative Arrays
[Implemented] Associative Arrays
Bam. I know it's not a BASIC construct but I think it's the single most useful thing about PHP and other languages that have them as native variable types.
Anyway, just wanted to add that to the stack of feature requests
Anyway, just wanted to add that to the stack of feature requests
-Mitchell
Check out kBilling for all your billing software needs!
http://www.k-billing.com
Code Signing / Authenticode Certificates (Get rid of those Unknown Publisher warnings!)
http://codesigning.ksoftware.net
Check out kBilling for all your billing software needs!
http://www.k-billing.com
Code Signing / Authenticode Certificates (Get rid of those Unknown Publisher warnings!)
http://codesigning.ksoftware.net
It's so called 'HashMap' array, which has a key (basically a string) and a value. It's to have faster/easier data handling when your key can't be a sequential number
It heavily used in JAVA for example. I may introduce this kind of data storage later.
Code: Select all
a$ = "Book"
b$ = "Book2"
a(a$) = "Author1"
a(b$) = "Author2"
Fred, excellent to hear!
-Mitchell
Check out kBilling for all your billing software needs!
http://www.k-billing.com
Code Signing / Authenticode Certificates (Get rid of those Unknown Publisher warnings!)
http://codesigning.ksoftware.net
Check out kBilling for all your billing software needs!
http://www.k-billing.com
Code Signing / Authenticode Certificates (Get rid of those Unknown Publisher warnings!)
http://codesigning.ksoftware.net
Thread resurrection 
4 years past (wow!), just checking...
4 years past (wow!), just checking...
-Mitchell
Check out kBilling for all your billing software needs!
http://www.k-billing.com
Code Signing / Authenticode Certificates (Get rid of those Unknown Publisher warnings!)
http://codesigning.ksoftware.net
Check out kBilling for all your billing software needs!
http://www.k-billing.com
Code Signing / Authenticode Certificates (Get rid of those Unknown Publisher warnings!)
http://codesigning.ksoftware.net
-
DarkDragon
- Addict

- Posts: 2348
- Joined: Mon Jun 02, 2003 9:16 am
- Location: Germany
- Contact:
My middle name is danger. Mitchell Danger Vincent.. That's me 
-Mitchell
Check out kBilling for all your billing software needs!
http://www.k-billing.com
Code Signing / Authenticode Certificates (Get rid of those Unknown Publisher warnings!)
http://codesigning.ksoftware.net
Check out kBilling for all your billing software needs!
http://www.k-billing.com
Code Signing / Authenticode Certificates (Get rid of those Unknown Publisher warnings!)
http://codesigning.ksoftware.net
Speed has nothing to do with it as there is no way you could compare the functionality of a hash table (AKA associative array) with that of a "plain" array. You simple can't do this with an array, fast or slow :
Name.s = TheSettings("name")
(IE, string, or *any* non-integer variable type indexes)
You can get almost the same functionality with the linked lists (especially with the sorting) but there are still plenty of uses for "real" hash tables.
I'm not saying PB is useless or anything but it's a very valuable language construct just the same
Name.s = TheSettings("name")
(IE, string, or *any* non-integer variable type indexes)
You can get almost the same functionality with the linked lists (especially with the sorting) but there are still plenty of uses for "real" hash tables.
I'm not saying PB is useless or anything but it's a very valuable language construct just the same
-Mitchell
Check out kBilling for all your billing software needs!
http://www.k-billing.com
Code Signing / Authenticode Certificates (Get rid of those Unknown Publisher warnings!)
http://codesigning.ksoftware.net
Check out kBilling for all your billing software needs!
http://www.k-billing.com
Code Signing / Authenticode Certificates (Get rid of those Unknown Publisher warnings!)
http://codesigning.ksoftware.net
I agree about the speed,
but speed is not a problem in all case, everytime, everywhere.
9 times on 10 i don't need run-time speed (ok the more it is, the better), but coding-time speed.
Such 'associative array' or also called 'dictionary' (search those keywords on the forum, there are some includes) are very useful, and powerful. Such data-structures are used in many languages (PHP, Python, Java, ...)
Particularly when working with SQL, parsing sort of INI files, parsing arguments of command-lines, but not only...
but speed is not a problem in all case, everytime, everywhere.
9 times on 10 i don't need run-time speed (ok the more it is, the better), but coding-time speed.
Such 'associative array' or also called 'dictionary' (search those keywords on the forum, there are some includes) are very useful, and powerful. Such data-structures are used in many languages (PHP, Python, Java, ...)
Particularly when working with SQL, parsing sort of INI files, parsing arguments of command-lines, but not only...
No programming language is perfect. There is not even a single best language.
There are only languages well suited or perhaps poorly suited for particular purposes. Herbert Mayer
There are only languages well suited or perhaps poorly suited for particular purposes. Herbert Mayer
Indeed, it's a *really* nice way of handling arbitrary length non-numeric "collections" of data.
PHP's array handling functions are about the best of any language I've seen. I realize that is due in large part to PHP's loose typing, something PB doesn't (and shouldn't, IMHO) support.
Anyway, just dropping this note back in the suggestion box
PHP's array handling functions are about the best of any language I've seen. I realize that is due in large part to PHP's loose typing, something PB doesn't (and shouldn't, IMHO) support.
Anyway, just dropping this note back in the suggestion box
-Mitchell
Check out kBilling for all your billing software needs!
http://www.k-billing.com
Code Signing / Authenticode Certificates (Get rid of those Unknown Publisher warnings!)
http://codesigning.ksoftware.net
Check out kBilling for all your billing software needs!
http://www.k-billing.com
Code Signing / Authenticode Certificates (Get rid of those Unknown Publisher warnings!)
http://codesigning.ksoftware.net



