| grandMA3 ユーザマニュアル » プラグイン » Lua 関数 - Object-Free API » DelVar(handle, string) | Version 2.2 |
DelVar 関数は、変数セット内の特定の変数を削除します。プラグインにおける変数の詳細については、変数関数 を参照してください。
変数が存在しない場合も false が返されます。
ユーザ変数セットから "myUserVar" という変数を削除します。
Lua |
return function() -- Deletes the variable called 'myUserVar' in the 'UserVars' variable set. local success = DelVar(UserVars(), "myUserVar") -- Prints the outcome of the deletion outcome. if success then Printf("Variable is deleted.") else Printf("Variable is NOT deleted!") end end |