Thread Rating:
  • 389 Vote(s) - 2.89 Average
  • 1
  • 2
  • 3
  • 4
  • 5
引数の定義はキーワードor位置 どちらがよい?
09-05-2013, 05:21 PM,
#2
RE: 引数の定義はキーワードor位置 どちらがよい?
ワタスなら、こうかな・・・・。
Code:
{define-enum public Sex man, women}
{define-class public Person  
  field public-get name:String  
  field public-get sex:Sex  
  {constructor public {default name:String, sex:Sex}
     ....  
  }
}

{define-proc public {marry4 p1:Person, p2:Person}:void
     ....
}

|| 呼び出す。
{marry4 {"Nasu", Sex.man}, {"Bee", Sex.woman}}

いかがナス?

-B


Messages In This Thread
RE: 引数の定義はキーワードor位置 どちらがよい? - by nasuB - 09-05-2013, 05:21 PM
Forum Jump:


Users browsing this thread:
2 Guest(s)

MyBB SQL Error

MyBB has experienced an internal SQL error and cannot continue.

SQL Error:
1017 - Can't find file: 'mybb_threadviews' (errno: 2)
Query:
INSERT INTO mybb_threadviews (tid) VALUES('963')