ã¸ã§ããªã¯ã¹ã¯ãSwiftã®æãå¼·åãªç¹å¾´ã®ï¼ã¤ã§ããã¸ã§ããªã¯ã¹ã使ãã¨ãããããåã«å¯¾ãã¦æè»ã§åå©ç¨å¯è½ãªå¦çãåãè¨è¿°ãããã¨ãã§ãã¾ãã Swiftèªä½ã§ãã¸ã§ããªã¯ã¹ã¯å¤ç¨ããã¦ãããä¾ãã°é åããã£ã¯ã·ã§ããªãåã«ä¾åããåãããã«å¤ãæ ¼ç´ãããåãåºãããã§ããã®ããã¸ã§ããªã¯ã¹ã使ã£ã¦å®è£ ããã¦ããããã§ãã ã¸ã§ããªã¯ã¹é¢æ° ããã§ã¯ä¾ã¨ãã¦ãIntåã®å¤ã®å¤§ããæ¹ãè¿ãé¢æ°ãèãã¦ã¿ã¾ãã // Intåã®å¤§ããæ¹ãè¿ã func bigger(val1: Int, val2: Int) -> Int { return val1 > val2 ? val1 : val2 } println(bigger(10, 20)) // 20 ãã®é¢æ°ã¯ãIntåã®å¼æ°ã«å¯¾ãã¦å¤§ããæ¹ã®å¤ãè¿ãã¾ãããFloatåãDoubleåã®å¼æ°ã渡ãæ§ã«ããã¨ã³ã³ãã¤ã«ã¨ã©ã¼ã«ãªãã¾ã
{{#tags}}- {{label}}
{{/tags}}