ããä¸ãfunc å½æ°åï¼ åæ°åéï¼ç±»å ï¼åæ°åéï¼ç±»å...ï¼ï½ï½
说æ:
1: func æ¯å½æ°å
³é®å
2ï¼ï½ï½ å½æ°ä½
3: åæ°åéæ¯é»è®¤å¸¸éç±»åï¼ä¸è½å¨å½æ°å½æ°ä½éé¢ç´æ¥ä¿®æ¹
å³ func A (value:String) ä¸ func A (let value:String)åæ³æ¯ç¸åçï¼å³value æ¯å¸¸éã
äºãèä¾
ãã/*
1: func å½æ°å
³é®å
ãã2ï¼ä¸¤ä¸ªåæ°åé value åvalue1é½æ¯å¸¸é ä¸è½ä¿®æ¹
ãã3ï¼SayHello("hello","swift") è°ç¨å½æ°çæ¹æ³
*/
ããfunc SayHello(value :String,value1:String){
ããvar str = value + " " + value1
ããprintln(str)
ãã}
ããSayHello("hello","swift")
è¿è¡ç»æ
hello swift
温馨提示:内容为网友见解,仅供参考