## Tcl9.0.3/Tk9.0.3 Documentation > Tcl Commands > join

### Tcl/Tk Applications | Tcl Commands | Tk Commands | [incr Tcl] Package Commands | SQLite3 Package Commands | TDBC Package Commands | tdbc::mysql Package Commands | tdbc::odbc Package Commands | tdbc::postgres Package Commands | tdbc::sqlite3 Package Commands | Thread Package Commands | Tcl C API | Tk C API | [incr Tcl] Package C API | TDBC Package C API

### NAME

join — リスト要素を接続して文字列を生成する Create a string by joining together list elements

### 構文 SYNOPSIS

join list ?joinString?

### 説明 DESCRIPTION

list 引数は､有効な Tcl リストでなければならない｡この命令は､それぞれの隣り合う要素の対を joinString によって区切って､ リスト の全ての要素を接続して文字列を形成して返す｡ joinString 引数の無為設定は空白文字である｡ The list argument must be a valid Tcl list. This command returns the string formed by joining all of the elements of list together with joinString separating each adjacent pair of elements. The joinString argument defaults to a space character.

### 用例 EXAMPLES

コンマで区切ったリストを作る: 　　 Making a comma-separated list:

    set data {1 2 3 4 5}
    join $data ", "
         → 1, 2, 3, 4, 5

join を使用して､リストを水準一つ分だけ均一化する: 　　 Using join to flatten a list by a single level:

    set data {1 {2 3} 4 {5 {6 7} 8}}
    join $data
         → 1 2 3 4 5 {6 7} 8

### SEE ALSO

list, lappend, split

### KEYWORDS

element, join, list, separator
Copyright © 1993 The Regents of the University of California.
Copyright © 1994-1996 Sun Microsystems, Inc.