3
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

Tclで複数の変数に同じ値を設定する

Posted at

変数xとyの両方に、同じ値を設定したいときに一行で書く方法。あまりサンプルなどで見かけないので確認しました。
set コマンドが、設定した値を戻り値として返すのでそれを使う。

set x [set y 3]

参考
http://www.tcl.tk/man/tcl8.5/TclCmd/set.htm

3
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
3
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?