Skip to Content
Exploring Expect
book

Exploring Expect

by Don Libes
December 1994
Intermediate to advanced
606 pages
16h 7m
English
O'Reilly Media, Inc.
Content preview from Exploring Expect

The Current Scope

By typing "s 14“, the debugger executes fourteen steps. This brings me to the first command in procedure p3.

dbg8.8> s 14
4: set m 0
dbg5.9> w
 0: expect -D 1 debug-test.exp
 1: p1
 2: p2
*3: p3
 4: set m 0

The asterisk denotes that p3 is the current scope. I can now execute Tcl commands appropriate to the scope of p3. This includes commands that can look or operate directly in other scopes such as global, uplevel, and upvar, but it is simpler yet to move the current scope up and down the stack.

dbg5.10> uplevel {set c}
4
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

AI Agents in Action

AI Agents in Action

Micheal Lanham
Learning Go

Learning Go

Jon Bodner

Publisher Resources

ISBN: 9781565920903Supplemental ContentErrata Page