在VB中如何为用户自定议类型赋值?

发布时间:2024-05-10 13:05 发布:上海旅游网

问题描述:

比如
public type student
dim name as string
dim age as integer
end type
如何对student类型的变量赋值

问题解答:

你的问题是不是有问题,你的题目中student是你自己定义的数据类型!怎么可能给数据类型赋值呢,你是不是想给数组赋值??你的题目好象也有问题,你只是定义了数据类型,但是你并没有把变量声明为你定义的数据类型!!!你在这里可能把student理解为数组了,所以才会这样,希望你能把问题描述的更清楚一点.
type student
name as string*4
age as integer
end type
dim s as student
with s
.name="张三"
.age="19"
end with

热点新闻