From: SourceForge.net <no...@so...> - 2005-02-15 08:05:54
|
Feature Requests item #1122940, was opened at 2005-02-15 01:05 Message generated for change (Tracker Item Submitted) made by Item Submitter You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=719009&aid=1122940&group_id=130646 Category: C-API Group: None Status: Open Resolution: None Priority: 5 Submitted By: Stephen Deasey (sdeasey) Assigned to: Stephen Deasey (sdeasey) Summary: Tcl command switch parsing routines Initial Comment: Parsing the switches and arguments for a Tcl command can be a real pain: it's very easy to make off-by-one errors, and it often involves a lot of repetitive typing which obscures the real intent of the command. The attached patch provides the routine Ns_ParseObjv. It parses switches and arguments, checks types, and generates error/usage messages automatically. Switches are handled efficiently via indexed lookups. The intent is not only to reduce the number of errors in switch handling code but to make switch handling such an easy task that developers are more likely to design easy to use, tcl-friendly APIs rather than APIs that are convenient to implement. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=719009&aid=1122940&group_id=130646 |