変数の型に名前を付ける
[indices, onames] = typename()
整数列ベクトル: 各定義済みのデータ型の型コード.
文字列の列ベクトル: 型コードを指す名前.
typename は
定義済みのデータ型に関する情報を返します.
関数および演算子のオーバーロードにおいて,
データ型に関連付けられた汎用名を
オーバーロード関数の名前を作成する際に指定できる
できるようになります(オーバーローディング参照).
typename は,
ハードコードされたデータ型に関して
この汎用名を処理する際に使用できます
(tlist または mlistにコード化されたデータ型の
場合,汎用名は他の方法で定義されます, overloadingを参照ください).
[ind, onames] = typename(); mprintf("Type index: %3d overloading code: ""%s""\n", ind, onames) | ![]() | ![]() |
--> mprintf("Type index: %3d overloading code: ""%s""\n", ind, onames)
Type index: 1 overloading code: "s"
Type index: 2 overloading code: "p"
Type index: 4 overloading code: "b"
Type index: 5 overloading code: "sp"
Type index: 6 overloading code: "spb"
Type index: 8 overloading code: "i"
Type index: 9 overloading code: "h"
Type index: 10 overloading code: "c"
Type index: 13 overloading code: "function"
Type index: 14 overloading code: "f"
Type index: 15 overloading code: "l"
Type index: 16 overloading code: "tl"
Type index: 17 overloading code: "ml"
Type index: 128 overloading code: "ptr"
Type index: 129 overloading code: "ip"
Type index: 130 overloading code: "fptr"