
|
Go to the first, previous, next, last section, table of contents.
- newstruct(name)
-
:: 構造体名が nameの構造体を生成する.
- return
-
構造体
- name
-
文字列
-
名前が name である構造体を生成する.
-
あらかじめ, name なる構造体が定義されていなければならない.
-
構造体の各メンバは演算子
-> により名前でアクセスする.
メンバが構造体の場合, 更に -> による指定を続けることができる.
[0] struct list {h,t};
0
[1] A=newstruct(list);
{0,0}
[2] A->t = newstruct(list);
{0,0}
[3] A;
{0,{0,0}}
[4] A->h = 1;
1
[5] A->t->h = 2;
2
[6] A->t->t = 3;
3
[7] A;
{1,{2,3}}
- 参照
-
section
arfreg ,
section 構造体定義
Go to the first, previous, next, last section, table of contents.
|