You can check a Boolean value in VBScript using CBool() function. This function return true for non zero number and throw error with non numeric value.
for 0 as input, CBool returns false.
QTP Program to convert numeric to Boolean values:
msgbox "CBool(10)? " & CBool(10) & vbCr & " CBool(0)? " & CBool(0) &vbCr & " CBool(-10) " & CBool(-10)
Output of given program:
0 comments:
Post a Comment