mIRC Homepage
Posted By: icez Arrays and Matrices - 26/06/03 04:20 PM
Well, I've been able to make those myself, except the fact that the matrices are a little bit slower because of the way I did it. My suggestions would be to make arrays and matrices available to mIRC. For example:
Code:
/array [-r] <name> item,item,item,item,..
$array(name,N)

and..
Code:
/matrix [-r] name x:y value
$matrix(name,x,y)

For curious people, the way I did it, is by saving an array into a variable this way:
Code:
^cItem^cItem^cItem^cItem
where ^c is a special character (like chr(6)) then using gettok/numtok, etc.. I retrieve N item, into the array by reading the variable with some *tok. Same thing for matrices, execept that they have 2 set of special characters (to separate rows and columns)
Posted By: coolspot Re: Arrays and Matrices - 26/06/03 04:35 PM
This suggestion has been posted many many times already, when posting an idea, next time use the search feature and make sure so set it to search for all content regardless of how old it is... good suggestion though, I made a post about it myself here.
Posted By: Thray Re: Arrays and Matrices - 26/06/03 04:36 PM
A matrix is technically just an array of arrays, so why bother with a different command?

Also, I think tokens (/help $gettok, among other commands) are made to be kind of a substitute for arrays and such (at least, it can be)
Posted By: codemastr Re: Arrays and Matrices - 26/06/03 08:58 PM
My guess is because he probably wanted matrix operations as well, things that have no meaning in a 2-d array. A matrix is a special 2-d array consisting only of numbers. And because of that you get a bunch of mathematical operations you can do such as multiplying/adding/subtracting two matrices, as well as manipulating the individual rows of a matrix.
Posted By: Raccoon Re: Arrays and Matrices - 27/06/03 10:30 AM
It would be nice if mIRC handled Hash Tables internally in such a way that allowed you to create a multi-dimensional array / matrix. I'm just not sure what kind of limits Windows would have on creating the thousands and thousands of hash tables necessary to make this work. Perhaps hash tables would be the wrong approach, and something much simpler could be used. Just my thoughts on the matter.

- Raccoon
Posted By: codemastr Re: Arrays and Matrices - 27/06/03 01:57 PM
Windows would have no limits on such a thing. There is no CreateHashTable function in Windows, if Khaled uses hash tables, then he wrote the code to handle it himself. The only limitation is available memory. But as for allowing multidimensional hash tables, thats simply not how hash tables work.
Posted By: icez Re: Arrays and Matrices - 28/06/03 04:08 PM
Sorry:\ I actually did search the word 'matrix', 'matrice', and 'array' in everything:\
© mIRC Discussion Forums