File: hello.tcl

package info (click to toggle)
tclws 2.6.2-1
  • links: PTS
  • area: main
  • in suites: buster
  • size: 884 kB
  • sloc: tcl: 7,431; makefile: 18
file content (25 lines) | stat: -rw-r--r-- 491 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
# Trivial application-direct URL for "/hello"
# The URLs under /hello are implemented by procedures that begin with "::hello::"

Direct_Url /hello	::hello::

namespace eval ::hello {
    variable x [clock format [clock seconds]]
}

# ::hello::/ --
#
#	This implements /hello/

proc ::hello::/ {args} {
    return "Hello, World!"
}

# ::hello::/there --
#
#	This implements /hello/there

proc ::hello::/there {args} {
    variable x
    return "Hello, World!<br>\nThe server started at $x"
}