subroutine webtcl
**********************************************************************
* webtcl: tcl over the web
**********************************************************************
include wbp w3include
am = char(254)
* Make the terminal as deep as possible
* -------------------------------------
call w3Term( 124, 0) ;* 124 wide, boundless in depth
* Get the results
* ---------------
call w3GetVal( val, 'TCL' ) ;* Get the command to execute from the form
execute val capturing out
*out = 'This tcl function is denied over the Internet.'
* Display results
* ---------------
call w3Printn( 'Content-type: text/html' )
call w3Printn( '' )
call w3Printn( '<html>' )
call w3Printn( '<head>' )
call w3Printn( '<title>' )
call w3Printn( val )
call w3Printn( '</title>' )
call w3Printn( '</head>' )
call w3Printn( '<body>' )
call w3Printn( '<h3>' )
call w3Printn( val )
call w3Printn( '</h3>' )
call w3Printn( '<hr>' )
call w3Printn( '<pre>' )
dc = dcount(out,@am)
for i = 1 to dc
call w3Printn( out<i> )
next i
call w3Printn( '</pre>' )
call w3Printn( '</body>' )
call w3Printn( '</html>' )