I've looked around but was suprised that I couldn't really find anything that explained this. If I have:
我环顾四周,但很惊讶我找不到任何解释这个的东西。如果我有:
func checkEmail ()
{
var test = true
return test
}
...elsewhere in the code....
var emailStatus = checkEmail ()
How can I make this function return the boolean value of true?
如何使此函数返回布尔值true?
1 个解决方案
#1
34
func checkEmail() -> Bool {
var test = true
return test
}
Elsewhere in the code....
在代码的其他地方....
var emailStatus = checkEmail()
#1
34
func checkEmail() -> Bool {
var test = true
return test
}
Elsewhere in the code....
在代码的其他地方....
var emailStatus = checkEmail()