Код: Выделить всё
var value = 33 //This will make an integer type of value variable with value 33
value = 22.44 //This doesn't execute as its assigning Double/Float value to an integer.
Код: Выделить всё
1.
value = Double(value)
value = 44.55 //Error here
2.
value = Double(33.44) //Error here too.
3.
value : Double = 33.22 //Error here too.
ПРИМЕЧАНИЕ. Я нахожусь на уровне обучения в Свифт.
Спасибо.
Подробнее здесь: https://stackoverflow.com/questions/296 ... playground
Мобильная версия