rikky_module.assign
指定した文字列を名前に持つグローバル変数を使用する。
code:Lua
rikky_module.assign("make", key, value)
table:引数
名前 型 説明
key string 変数名にする文字列
value string, number, boolean, table 代入する値
戻り値 boolean 成功すればtrue
code:Lua
rikky_module.assign("copy", key)
table:引数
名前 型 説明
key string 変数名にする文字列
戻り値 string, number, boolean, table, nil 変数の値 変数が存在しなければnil
変数名になる文字列は、先頭の文字が_0123456789以外の英字であり、かつ予約語でない必要がある tips
rikky_moduleが無くてもこのようなコードで代用できる。 (変数名のチェックは行わない)
code:Lua
function assign(mode,name,value)
mode=mode:lower()
if(mode=="make")then
return true
elseif(mode=="copy")then
end
return false
end