Re: How to implement pointer operation
- From: Tobias Hippler <hi@xxxxxxxxx>
- Date: Fri, 29 Jun 2007 10:10:00 +0200
prabu wrote:
Hi,
This may be a simple one. Consider the following.
set a 10
set b $a
Now I want to print the value of "a" using the variable "b". How can I
do this?
Thanks in Advance,
Prabu.
Hi,
in addition to the already proposed solutions, you can always use "upvar" to create sort of references to variables:
set a 10
upvar 0 a b
set b 17
puts $a; # output: 17
Tobi.
.
- References:
- How to implement pointer operation
- From: prabu
- How to implement pointer operation
- Prev by Date: Re: Toggle image state
- Next by Date: Re: unload state
- Previous by thread: Re: How to implement pointer operation
- Next by thread: tclodbc
- Index(es):