aiscript icon indicating copy to clipboard operation
aiscript copied to clipboard

関数の引数を省略してもexistsはtrueを返す

Open taiyme opened this issue 10 months ago • 8 comments

@func(arg) {
  return exists arg
}
func()

引数 arg を省略した場合でも、exists arg はtrueを返します。 (引数の省略は正式な構文ではないが……)

引数を省略した場合、そのまま扱うとエラーになってしまうので、existsで判定できると助かります。

  • 関連PR: #475

taiyme avatar Apr 25 '24 06:04 taiyme