dimanche 1 mars 2015

what does Error "Thread 1:EXC_BAD_INSTRUCTION (code=EXC_I386_INVOP, subcode=0x0)" mean?


Vote count:

0




i got this error, and how can i solve this error? The code works normally but, in the calculator , when i click the only equal button, it gives that error, so help ? thanks in advice!


@IBAction func equals(sender: AnyObject) {



secondNumber = Screen.text!.toInt()! // here it shows an error which is "Thread 1:EXC_BAD_INSTRUCTION (code=EXC_I386_INVOP, subcode=0x0)"

if operation == "+"{
result = firstNumber + secondNumber
}
else if operation == "-" {
result = firstNumber - secondNumber
}
else if operation == "x" {
result = firstNumber * secondNumber
}
else {
result = firstNumber / secondNumber
}
Screen.text = "\(result)"
}


asked 11 secs ago







what does Error "Thread 1:EXC_BAD_INSTRUCTION (code=EXC_I386_INVOP, subcode=0x0)" mean?

Aucun commentaire:

Enregistrer un commentaire