MATRIX
a matrix (array in other languages) is a multidimensional list of variables.
HAI CAN HAS STDIO? I HAS A TBL ITZA MATRIX TBL 0 IZ 1 TBL 1 IZ 2 TBL 2 IZ "^_^" TBL 3 IZA MATRIX TBL 3 0 IZ TBL 0 I HAS A I ITZ 0 IM IN UR LOOP, UPPIN YR I!!1 TILL NERF LENGTH IN UR TBL!!1 VISIBLE TBL I IM OUTA UR LOOP VISIBLE TBL 3 0 KTHXBYE
Noobs
I HAS A TBL ITZA MATRIXcreates a new variable called tbl and makes it a matrix
TBL 0 IZ 1
the first element in tbl is now 1
TBL 3 IZA MATRIX
create a new matrix within the original matrix
IM IN UR LOOP, UPPIN YR I!!1 TILL NERF LENGTH IN UR TBL!!1
stay in the loop, increase I by 1 until i>=tbl.length-1
VISIBLE TBL 3 0
prints the value at tbl[3][0]
Proposal for alternate syntax - I guess MATRIX is ok, but I was thinking PILE
I HAS A pokemons IZ PILE pokemons 0 IZ "Pikachu" pokemons 1 IZ "Jigglypuff"
then to loop through the PILE
ALL MAH pokemons IZ pokemon
VISIBLE pokemon
MOAR
MAH BUKKIT has been proposed. BUKKIT is probably a better array indicator.
I HAS A pokemons IZ BUKKIT
Need a good syntax for showing the keys too.
— z7q2, 2007/05/29 15:22
BUKKIT is a nice keyword for array, didn't think of that :p
For the keys, we could use the # to indicate number, like
TBL#1,3
would be the same as tbl[1][3]
How about R for getting an object of a particular type?
I HAS A TBL R MATRIX I HAS A VAR IZ 0
— sabik, 2007/05/29 17:54
I gotta say, I like mah better than matrix. Matrix seems invented, while MAH has kitty precedence. — Risser, 2007/05/29 18:04
Agree with the above. Also, when I coded up hey-guys for threading, MAH just flowed better. — wohali, 2007/05/29 19:44