VBScript CBool 함수

❮ 완전한 VBScript 참조

CBool ​​함수는 표현식을 부울 유형으로 변환합니다.

표현식은 숫자 값이어야 합니다.

통사론

CBool(expression)
Parameter Description
expression Required. Any valid expression. A nonzero value returns True, zero returns False. A run-time error occurs if the expression can not be interpreted as a numeric value

예시

예시

<%

response.write(CBool(5) & "<br />")
response.write(CBool(0) & "<br />")
response.write(CBool(-5) & "<br />")

%>

위 코드의 출력은 다음과 같습니다.

True
False
True

❮ 완전한 VBScript 참조