LoginSignup
1
1

More than 1 year has passed since last update.

関数の作り方

Last updated at Posted at 2022-01-07

初心者用に関数の作り方のテンプレを置いておきます

fun 関数名(引数) : 戻り値の型 {
    この関数で行いたい処理
   return 戻り値
}

例: 

fun ChangeSwitch(text:A):Boolean{

  if(text == A){
    (text が A だったら〜〜〜してね)}
  return true
}

//これで true の値が 取れる

1
1
1

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
1