Scratchpad r76 (See the current copy)
- My Friends
- My Scratchpad
- Information about Threads
- Random Diatribes
- Information about Random Number Generation
- Random Scripts
- Information about interesting Current Projects
- Random Links
Feel free to contact me about this website at mailto:wiki@rkeene.org
- Random Demonstrations
- Information about Tcl
- Information about Roy Keene
What you will find here
HTML in Tcl
Another example of the flexibility of Tcl. Any non-existent commands that look like HTML tags are output to standard out.
proc unknown args {
set args [string trim $args]
if {![regexp {^<.*>$} $args]} {
error "Unknown command: $args"
}
puts -nonewline [join $args]
return 0
}
<html>
<head><title>; puts "This is a test"; puts "joe"; <h>; puts "bob"; </title></head>
<body bgcolor="#FFFFFF" text="#000000">
puts "This is a test"
</body>
</html>