Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

関数の引数に省略値が指定できないでエラーになる #37

Closed
kujirahand opened this issue Jul 20, 2024 · 1 comment
Closed

Comments

@kujirahand
Copy link
Owner

関数の引数に省略値が指定できないでエラーになる

定義
Function 関数名(型 引数1=省略値,型 引数2=省略値,型 引数3=省略値...){
  定義内容
}

(ref) https://sakuramml.com/doc/kouza/mml4.htm

@kujirahand
Copy link
Owner Author

以下のコードが正しく動いているのでOK

//引数の省略の例

Function FUNC(A,B=100,C=101){
  Print(A);
  Print(B);
  Print(C);
}
FUNC(1,2,3);//省略しないで関数呼び出し
FUNC(1); //第2,第3引数を省略して関数呼び出し。
FUNC; //すべての引数を省略して関数呼び出し。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant