0% found this document useful (0 votes)
43 views1 page

TCL Uplevel

The uplevel command executes a script in a different stack frame. It concatenates all arguments and evaluates them in the context indicated by the optional level parameter, defaulting to 1. Higher levels indicate earlier frames like the calling procedure or top level context.

Uploaded by

조동올
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
43 views1 page

TCL Uplevel

The uplevel command executes a script in a different stack frame. It concatenates all arguments and evaluates them in the context indicated by the optional level parameter, defaulting to 1. Higher levels indicate earlier frames like the calling procedure or top level context.

Uploaded by

조동올
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

uplevel

개요 : Execute a script in a different stack frame


Syntax : uplevel ?level? arg ?arg ...?
Process
1. All of the arg arguments are concatenated
2. The concatenated result is evaluated in the variable context indicated
by level.
3. Returns the result of that evaluation.
If level is omitted then it defaults to 1
info level 명령어
level of the current procedure 반환
예시
상황 : Procedure a was invoked from top-level, a called b, and b called c.
top level - a - b - c 순서대로 각각 level #0 - #1 - #2 - #3
Suppose that c invokes the uplevel command.
If level is 1 or #2 or omitted, then the command will be executed in the
variable context of b.
If level is 2 or #1 then the command will be executed in the variable
context of a.
If level is 3 or #0 then the command will be executed at top-level (only
global variables will be visible).
c 가 다음 명령어 uplevel 1 {set x 43; d} 을 호출했다고 가정. d is another
Tcl procedure
The set x 43 은 b's context에서 수행되고, d는 level #3 에서 수행됨.
연이어 uplevel {arg} 수행 시, 여전히 b's context에서 arg 수행.

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy