[NTLUG:Discuss] OT: Tcl/Tk question

fredjame fredjame at fredjame.cnc.net
Mon Jul 19 21:34:49 CDT 2004


The following procedure is working, but I have noted that 'string match 
...' already returns 1 on a match and 0 on no match.  So my question is 
how to rewrite this without the 'if ...' and the extra 'return'? - it is 
a syntax question actually.
Thank you in advance for any help you may be able to offer.
Regards
Fred James

proc MatchColor {color} {
 If [string match *$color* [getMem Document ChannelNames]] {
   return 1
  }
 return 0
}


-- 

...we are fellow passengers...




More information about the Discuss mailing list