type
code:Lua
t = textmodule.type(v1, v2, ... vn)
モジュール
引数
table:_
変数 型 概要
1 v1 - 任意の変数
2 v2 - 任意の変数
...
n vn - 任意の変数
返り値
table:_
変数 型 概要
1 t string / table 変数v1~vnの型名
概要
任意の変数v1, v2, ... vnの型の名前を返す。
変数が1つの場合は文字列、2つ以上の場合はテーブル型で返す。
引数の値が__typeメタメソッドを持っている場合は、その関数を実行する。
table:型名一覧
型名 Lua内での型名 概要
nil nil nil
boolean boolean ブーリアン型
number number 数値型
string string 文字列型
function function 関数型
userdata userdata ユーザーデータ型
thread thread スレッド
table table テーブル
例
code:Lua
require("textmodule")
print(12, textmodule.type(12))
print("aviutl", textmodule.type("aviutl"))
t = textmodule.type(100, "hello", textmodule.vector3.new())
code:Console
12 number
aviutl string