jaytea commented on a Page, mIRC Arrays  -  Dec 25, 2010

sunslayer, similar in what way? there are layers of abstraction and overhead between low level arrays and both of these implementations. a hash table in mIRC is essentially an array but, of course, each element points to a linked list of key and data associations. using a collection of variables as in this snippet restricts mIRC to the use of a single linked list (think: a hash table with 1 slot) wherein performance could take a hit as the size of the data set increases. syntax-wise however, %var[0], %var[1] etc. is just about the closest you're going to get to the naming convention of low level arrays - even if the items are not contiguous in memory and no more related (as far as the scripting engine is concerned) than %abc and %def.

they are still a far cry from arrays in C, which is unsurprising and understandable given the nature of mIRC script. it is futile to try and replicate these low level constructs as you don't get the performance gains that you otherwise would; instead, try to use the features of the language in an efficient way on a case by case basis :P

as for the construct in mIRC most similar to low level arrays: anything involving a collection of bytes would probably be as close as you're going to get. a &binvar is basically a char array.

 Respond  
Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.