Page 2 of 2

Posted: Thu Mar 29, 2007 12:12 pm
by GedB
Karbon,

Are you aware of the SRod's Hash library?

http://www.purebasic.fr/english/viewtopic.php?t=24683&

Posted: Thu Mar 29, 2007 1:12 pm
by Karbon
Yes, I saw it yesterday.

Posted: Thu Mar 29, 2007 2:12 pm
by Trond

Code: Select all

You simple can't do this with an array, fast or slow : 

Name.s = TheSettings("name")
But why would you want to do that?

Posted: Thu Mar 29, 2007 3:45 pm
by Flype
Trond,

Did you ever programmed in PHP ?

Posted: Thu Mar 29, 2007 4:05 pm
by Trond
Yes.

Posted: Thu Mar 29, 2007 4:19 pm
by Flype
So ?

even in PHP, you do not use them ?

Posted: Thu Mar 29, 2007 4:55 pm
by Trond
No.

Posted: Thu Mar 29, 2007 6:35 pm
by Flype
ok - that's what i call freedom :D

Posted: Thu Mar 29, 2007 6:57 pm
by AND51
I would also appreciate "associateive Arrays" (Hashes) as known from Perl or shown in the example code.

Posted: Mon Apr 02, 2007 5:54 pm
by naw
I miss Associative Arrays from Unix Shell Scripting. I dunno maybe they are much slower than regular Arrays. But does it really matter?

If you need speed and sequential addressing use XXX(1) - XXX(99).
If you want descriptive names Associative Arrays rule...

For most Applications speed doesnt really matter - Most Windows servers CPUs are only 5% utilised anyhow. So you spend hours optinmising code to run on a machine that for 95% of the time has nothing to do....

Posted: Mon Apr 02, 2007 10:51 pm
by GedB
An associative array can make some complicated stuff much faster by using the 'Orcache Manoeuvre'

http://use.perl.org/comments.pl?sid=33958