-1

I have following set of keywords set keywords {a b c d}. I want to print index value of c. How to do this in tcl?

1 Answers1

1

With lsearch

% set keywords {a b c d}
a b c d
% set idx [lsearch -exact $keywords "c"]
2
glenn jackman
  • 85,964