-2
我在Swift程序上工作,现在出现问题:如何将Int64与Int64进行比较
如何比较Int64和Int64?
if(msgCount.value != msg.longLongValue){
错误:
Binary operator '!=' cannot be applied to operands of type 'Int64' and 'Int64'
我在Swift程序上工作,现在出现问题:如何将Int64与Int64进行比较
如何比较Int64和Int64?
if(msgCount.value != msg.longLongValue){
错误:
Binary operator '!=' cannot be applied to operands of type 'Int64' and 'Int64'
您可以直接比较平等
试试这个,它会帮助你:
let msgCount : Int64=100
let msg : Int64=101
if(msgCount != msg){
// perform your logic here.
}
试试这个,如果([msgCount.value比较: msg.longLongValue] == NSNotFound)或者if([msgCount.value isEqual:msg.longLongValue])。 –
如果(![msgCount.value isEqual:msg.longLongValue]),请尝试此操作 –
您必须标记该语言的问题......大概很快? – Wain