aboutsummaryrefslogtreecommitdiff
path: root/examples/dbgtest.tcl
blob: ef6b56fce9ab37149ae93093c4ac1a51c5c80321 (plain)
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
26
27
28
29
30
31
32
33
34
# An example script useful for testing the Jim debugger
# Taken from http://www.nist.gov/msidlibrary/doc/libes93c.ps

set b 1

proc p4 {x} {
    return [
        expr 5+[expr 1+$x]]
}

set z [
    expr 1+[expr 2+[p4 $b]]
]

proc p3 {} {
    set m 0
}

proc p2 {} {
    set c 4
    p3
    set d 5
}

proc p1 {} {
    set a 2
    p2
    set a 3
    set a 5
}

p1
set k 7
p1