About types of variables



2009/12/3 ???????????? ?????? <kotzeve at hotmail.com>:

> I have s:"GAN";
> ???????? x:charlist(s);
> ???????? C:matrix([A,B,C,F],[1,2,3,4]);
>
> And i want to compare s(1) with C[1][1]..What i have to do??After trying a
> lot of things i understood that they are different types and i can't compare
> them.I find one lazy solution by putting the word gun like this -> x:[G,U,N]
> but it isn't useful...My problem is that i have made a matrix
>
> A:matrix([A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z,_],
> [1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,0]);
>
> and i want? to make a function like cint.I want to take a string and compare
> it with A[1][i] and if are equal i want to put the number from A[2][i] in an
> other new matrix.

OK, I don't understand what your goal is here, so I won't worry
whether there is a better general approach.
To make it work as you have set up the problem,
just put elements in the matrix which are strings like this:
"A", "B", "C", ....

best,

Robert Dodier