Additionally, while being able to return the complete index might be useful - e.g. "My comchans with $nick are: $comchan($nick,1-)" - the method you intend to use for a loop is imho unnecessarily bloated (no offense).
Code:
tokenize 32 $comchan($nick,1-)
while ($0 > 0) {
  msg $1 $nick $+ : I'm a b00bo
  tokenize 32 $2-
}
vs:
Code:
var %n = 1
while ($comchan($nick,%n)) {
  msg $v1 $nick $+ : I'm a b00bo
  inc %n
}
Ain't the latter one sufficient and more clear?