Jump to content
Sign in to follow this  
calo_mir

Associative arrays

Recommended Posts

It's all pretty hypothetical at this point. I'd like to store a pair of values - the number of shots fired and the number of shots that actually hit a target. Multiple targets, indexed by distance:

targets [distance].shots_fired = 3;
targets [distance].shots_hit = 2;

etc.

---------- Post added at 05:13 PM ---------- Previous post was at 05:11 PM ----------

I realise we don't have composite types or anything like that...

Share this post


Link to post
Share on other sites

I will agree that more data structures would be nice, however many wouldn't be used enough to be worth implementing IMO.

Share this post


Link to post
Share on other sites

well, sure you can easily implement your own assoc. arrays, but where is the point? It's so ugly to do call's for simple array manipulation... I mean.. call hashCreate? ...call hashGet/hashSet? oh boy.. and I've thought coding should be fun.. hehe

assoc. arrays would be definitely welcome, but nicely implemented for they are nothing other than syntactic sugar. Making ugly syntactic sugar (salt!) is rather pointless (though I can understand that you rather have such an ugly implementation than no assoc. arrays at all. (no offense at the CBA team, that's not the point, hehe))

Anyway, the data structre needed the most is IMHO an object, like they're implemented in ECMA script. Heck, give us ECMA script and drop the BISscript alltogether. Yay!

Edited by ruebe

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×