2.9 Tuple
(タプル)
Compound data type with a fixed number of terms:
(?)
{Term1,...,TermN}
Each term Term in the tuple is called an element.
(tuple内の各Termはエレメントと呼ばれる)
The number of elements is said to be the size of the tuple.
(エレメントの数はtupleのサイズである。)
There exists a number of BIFs to manipulate tuples.
(tupleを操るBIFsは多く存在する。)
Examples:
1> P = {adam,24,{july,29}}.
{adam,24,{july,29}}
2> element(1,P).
adam
3> element(3,P).
{july,29}
4> P2 = setelement(2,P,25).
{adam,25,{july,29}}
5> tuple_size(P).
3
6> tuple_size({}).
0
0 件のコメント:
コメントを投稿