除了使用函数type外,如何检查一个值是否为Boolean类型?
使用下列函数:
> if a==true then
>> print(true)
>> elseif a==false then
>> print(false)
>> else
>> print(xxx)
>> end
除了使用函数type外,如何检查一个值是否为Boolean类型?
使用下列函数:
> if a==true then
>> print(true)
>> elseif a==false then
>> print(false)
>> else
>> print(xxx)
>> end