VB 变量有哪几种类型 result怎么用

例如:Dim a As Integer '整数型
分别还有哪些?

RESULT有什么用?
例:
Dim a, b, result As Double
a = Text1.Text
b = Text2.Text
result = 0
If b <> 0 Then
result = a / b
Text3 = result
以上为什么不能是C=A/B 而要用 RESULT=A/B
result As Double ’double是什么类型?
什么是双精度型?有什么用
integer变量一定是整数,那Double变量是怎么样子的呢?

Double 是双精度数字型

VB 变量的变量有:
(1)数字型 包括
byte 字节型
integer 短整型
long 长整型
single 单精度
Double 双精度
(2)string 字符串型
(3)boolean 逻辑型
(4)date 日期型
(5)Variant 可变型,接受什么类型都可以
你的例子中的 dim a,b , a,b就是Variant
(6)自定义类型 ,可用TYPE结构完成自定义
等等等等。。。。。。。
好多类型,你就好好研究吧!
温馨提示:答案为网友推荐,仅供参考
第1个回答  2009-04-26
VB哪来的什么字符型?

没有C里的char只有string 字符串形式的。

Double 是双精度数字型 .dim i as Double
Byte 是字节类型。
dim y as byte

double=0.00精确到2位
相似回答