AlgoSim
Homepage | Screenshots | Gallery of Visualisation | User's Guide | Function Reference | Download | FAQ | Support | Bugs and Solutions | Donate

Reference: indexOf

indexOf(v, x) returns the index of the first occurrence of the number x in the vector v. If x does not occur in v, indexOf(v, x) = -1.

indexOf(M, x) returns the index of the first occurrence of the number x in the matrix M. If x does not occur in M, indexOf(M, x) = ❨-1, -1❩.

indexOf(tbl, str) returns the index of the first occurrence of the string str in the table tbl. If str does not occur in tbl, indexOf(tbl, str) = ❨-1, -1❩.

indexOf(pm, clr) returns the index of the first occurrence of the pixel colour clr in the pixmap pm. If clr does not occur in pm, indexOf(pm, clr) = ❨-1, -1❩.