- s = "" + i;でintをStringに変換するのはなぜだめか
297 :デフォルトの名無しさん[sage]:2014/11/09(日) 07:30:26.87 ID:dOd/7vBB - >>296
C なんかユルユルだろ ガチガチってのはこういうことだ # 1 + 1.5;; Error: This expression has type float but an expression was expected of type int # float_of_int 1 +. 1.5;; - : float = 2.5
|
- s = "" + i;でintをStringに変換するのはなぜだめか
299 :デフォルトの名無しさん[sage]:2014/11/09(日) 08:43:44.19 ID:dOd/7vBB - >>298
"1" + 1.5 -> "11.5" 1.5 + "1" -> 2.5 だったら納得が行く? という具合にこの辺考え出すと難しい問題なので、迂闊に他言語をdisるとブーメラン必至
|
- s = "" + i;でintをStringに変換するのはなぜだめか
300 :デフォルトの名無しさん[sage]:2014/11/09(日) 08:44:28.80 ID:dOd/7vBB - 最後の一行は>>298にではなく一般論として。
|