mIRC Homepage
Posted By: MrStrike matrix - 11/11/03 10:27 PM
be able to create matrix like var %test[10][10]
Posted By: qwerty Re: matrix - 11/11/03 10:57 PM
It's already possible. Here's an example alias that creates a matrix and then runs through it (just type /matrix):
Code:
alias matrix {
  var %i = 1, %j
  ; filling the matrix
  while %i < 11 {
    %j = 1
    while %j < 11 {
      set [color:green]$+(%,matrix[,%i,][,%j,])[/color] Item %i %j
      inc %j
    }
    inc %i
  }
  ; running through the matrix and /echo-ing the items
  %i = 1
  while %i < 11 {
    %j = 1
    while %j < 11 {
      echo -s [color:blue]$eval([/color][color:green]$+(%,matrix[,%i,][,%j,])[/color][color:blue],2)[/color]
      inc %j
    }
    inc %i
  }
  ; cleaning up and finishing
  unset %matrix*
  echo -sc info /matrix finished
}
Posted By: bunar Re: matrix - 12/11/03 02:03 PM
may i ask what it is for? i saw just a bunch of

Item xx xx

where xx is number...
Posted By: KingTomato Re: matrix - 12/11/03 04:21 PM
When you get more into math, you'll appreciate matrixes. Array's consist solely around the concept of a matrix >:D
Posted By: CloCkWeRX Re: matrix - 13/11/03 07:35 AM
I really wish mirc had a better way of structuring data than this hack or the version w/ hash tables.

I find myself constantly needing to model data like XML parsed documents; or database recordsets. Yes, I know mirc isn't meant to be doing ANY of these things; but its far nicer than TCL + Eggdrop; which is aimed more at those things.

Still; I spose we can prevail.

© mIRC Discussion Forums