VB6.0如何连续声明变量

2025-04-03 20:36:22
推荐回答(4个)
回答1:

dim a as string ,b as string,c as string
只用一个dim,单语句,用逗号隔开,注意最好每个变量后面都表明类型,否则没有类型的变量将是variant类型

dim a as string: dim b as string: dim c as string
每个变量前面都有dim,说明是多语句,多语句在同一行要行冒号隔开。

回答2:

'一行一语句连续声明
Dim a As String, b As Integer
'一行多语句声明(冒号)
Dim a As String:Dim b As Integer

回答3:

好像是 dim a as string,b as string

回答4:

dim a as string,b as string