/* 変数の型宣言と型推論 */ var welcomeMessage: String var pi: Double = 3 var piFl: Float = 3 var piInt: Int = 3 var piAuto = 3 pi = 3.14 piFl = 3.14 // piInt = 3.14 // error: cannot assign value of type 'Double' to type 'Int' // piAuto = 3.14 // error: cannot assign value of type 'Double' to type 'Int'