-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Suraj N. Kurapati wrote:
> # determine current workspace
> ws=$(wmiir read /view/sel/sel/tags)
>
> wsIndex=0
> for (( i = 0; i < listLen; i++ )); do
> if test ${list[$i]} = $ws; then
> wsIndex=$i
> break
> fi
> done
Hmm, now that I think about it, a binary search can be used here
instead of this linear search because $list is already sorted.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.2 (GNU/Linux)
iD8DBQFEPIVBmV9O7RYnKMcRAkQxAJ91m2iBIDxMVaBoeHn3MihSN11rogCeJ2dd
5/xOxKBspIOjf3e6EBiCR/g=
=xGyJ
-----END PGP SIGNATURE-----
Received on Wed Apr 12 2006 - 06:42:49 UTC
This archive was generated by hypermail 2.2.0 : Sun Jul 13 2008 - 16:02:27 UTC