Given the following variables assignments:
What will the output of the following conditional be: outputX = If(CInt(doubleX+Cdbl(intX) +CDbl(stringX))> 38.30, 1, 0)
The conditional statement attempts to convert all variables to Double and then adds them up to compare against 38.30. However, the string '9.1' cannot be directly converted to a Double with CDbl because it is not in a correct format that can be recognized as a number (it might be due to the fact that it's a string with a comma instead of a period for a decimal point, depending on the culture settings of the system). This will cause a runtime error during the execution of the conditional statement. Reference:
Microsoft Visual Basic Guide: Type Conversion Functions
Paz
5 months agoRemona
6 months agoCorazon
6 months agoPaz
6 months agoGracie
6 months agoArleen
6 months agoKatina
6 months agoSylvia
6 months agoKatina
7 months ago