// 構造体
struct User1 {
var name: String;
init (_ name: String) {
self.name = name
}
mutating func changeName() {
self.name = name.uppercased()
}
}
var orginal = User1("taro")
// 参照渡しではなく値渡しである(POINT)
var copy = orginal
copy.name = "jiro"
print(orginal.name) //----- taro
print(copy.name) //----- jiro