what is the purpose of the iif in vb
问题 So, what is the purpose of the iif in vb? I know what it does, but I can't uderstand what is it for? Update: I know what it does. But "if(,,)" does the same. The only difference is that "Iif" will evaluate both expressions. So what is the purpose of doing this? Thank you! 回答1: It allows for a concise boolean logic expression which produces a value Dim value = Iif(someTest, trueValue, falseValue) Without the Iif or If operator this has to be expanded into a more combursome set of statements