VB
VB6 iif
벵거빠돌이
2018. 5. 14. 15:00
iif(expr, truepart, falsepart)
expr을 평가하여 결과에 따라 참일경우 truepart를 반환, 거짓일 경우 falsepart반환.
EX>
Dim a as Integer, b as Integer
a = 5
b = 10
IIf(a > b, "a is Big","b is Big")
>a is Big
IIf(b > a, b, a)
>10
IIf(True, "TRUE PART", "FALSE PART")
>TRUE PART
IIf(False, "TRUE PART", "FALSE PART")
>FALSE PART