VB 如何判断两个数 是否相等

来源:百度知道 编辑:UC知道 时间:2024/07/15 22:08:02
比如我要判断S是否等于2 是否可以写
if s=2 then

if int(text1.text)>int(text2.text) then
text3.text ="大数是:" & text1.text
else
text3.text ="大数是:" & text2.text
end if

如果按照你的写法,S的数据类型必须为数值型

if s=2 then

是可以判断的

判断后是执行then语句

可以
if s = 2 then
...
else
...
end if