Ho creato un nuovo parco giochi e ho scritto il codice come segue.Come convertire Int in Double nel playground Swift?
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.
ho cercato
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.
Ora cosa devo fare per assegnare in virgola mobile a valore.
NOTA: Sono a livello di apprendimento in Swift.
Grazie.
prova valore var = 33,0 –