TABLE OF CONTENTS


::pwtk::procName

SYNOPSIS

proc ::pwtk::procName {{level -1}} {

DESCRIPTION

If level == -1, returns the name of the calling proc or "top-level" if called from the top level. If level == -2, return the name of the calling proc of the calling proc, i.e., the name of the proc two-levels back. If level == -N, returns the name of the proc N-levels back.

Typically used internally by PWTK.

ARGUMENTS

SOURCE

    if { [info level] > abs($level) } {
        return [lindex [info level $level] 0]
    } else {
        return "top-level"
    }
}