[davidw]: It would be nice to see at least a simple example included for all Tcl man pages (or at the very least point to another page including an example). Here is the current state of things: ---- '''Files with examples:''' after.n exec.n glob.n linsert.n open.n split.n append.n exit.n global.n list.n puts.n subst.n array.n expr.n http.n llength.n read.n switch.n bgerror.n fconfigure.n if.n lrange.n regexp.n time.n break.n fcopy.n incr.n lrepeat.n rename.n uplevel.n catch.n fileevent.n interp.n lreplace.n return.n upvar.n concat.n for.n join.n lsearch.n scan.n vwait.n continue.n foreach.n lappend.n lset.n seek.n while.n encoding.n format.n lassign.n lsort.n set.n error.n gets.n lindex.n namespace.n socket.n '''Files without examples:''' Tcl.n dict.n history.n packagens.n regsub.n trace.n binary.n eof.n info.n pid.n safe.n unknown.n case.n eval.n library.n pkgMkIndex.n source.n unload.n cd.n fblocked.n load.n proc.n string.n unset.n clock.n file.n memory.n pwd.n tcltest.n update.n close.n filename.n msgcat.n re_syntax.n tclvars.n variable.n dde.n flush.n package.n registry.n tell.n ---- These are automatically generated (script below). Some of these do have examples, such as msgcat and tcltest. Others sort of do, but a functional bit of code that runs and demonstrates the command is always welcome. '''Exception List''': The list of files that really do have (good) examples: binary.n msgcat.n tcltest.n. and the list of files that describe commands that are too simple to really need examples (or that have them elsewhere): cd.n close.n The following files probably don't need an example: Tcl.n, case.n, filename.n, library.n, packagens.n, re_syntax.n, tclvars.n (and perhaps safe.n too) ---- Adding an example doesn't take much time, and lots are already available on the wiki. All you have to do is submit a patch to sourceforge. The man page markup looks like this: .SH "EXAMPLES" A time server: .CS proc Server { channel clientaddr clientport } { puts "Connection from $clientaddr registered" puts $channel [clock format [clock seconds]] close $channel } socket -server Server 9900 vwait forever .CE I used this code to check: package require fileutil package require struct foreach res [fileutil::grep ".SH.*EXAMPLE" [glob *.n]] { lappend examplefiles [lindex [split $res :] 0] } set examplefiles [lsort $examplefiles] set allfiles [lsort [glob *.n]] set noexamplefiles [lsort [struct::set difference $allfiles $examplefiles]] puts "Files with examples: $examplefiles" puts "" puts "Files without examples: $noexamplefiles" ---- [DKF]: Remember that some [Tk] docs need examples as well, though I'd tend to say not the widgets, as they're better demonstrated as part of the general [widget] demo. ---- [AM] What about Wiki pages that show a particular package in action? I mention it here because it seems a nice starting place for it ... For instance: * the http package is nicely illustrated with the page on the [wiki-reaper] * [A little Unicode editor] might serve as an illustration for dealing with Unicode [DKF]: I'm trying to keep examples ''very'' short. Both of those pages are several times too long for my current limit. ---- [Category Documentation]