未分类题

设在工程中定义了下列类型:
Type Stutype
ino As Integer
strname As String*20
strsex As String*1
smark As Single
End Type
在窗体上正确使用这个类型的是下列哪个操作( )。
A.Sub Command1_Click() Dim student As Stutype With student .ino=12 .Strname=smith .strsex=男 .smark=89 End With End Sub
B.Sub Command1_Click() Dim Student As Stutype With student .ino=12 .strname='smith' .strsex='男' .smark=89 End With End Sub
C.Sub Comnland1_Click() Dim student As Stutype With Stutype .ino=12 .strname='smith' .strsex='男' .smark=89 End With End Sub
D.Sub Command1_Click() Dim student As Stutype With student .ino=12 .Strname='smith' .strsex='男' .smark=89 End student End Sub

A.Sub
B.ino=12
C.Strname=smith
D.strsex=男
E.smark=89
F.Sub
G.ino=12
H.strname='smith'
I.strsex='男'
J.smark=89
K.Sub
L.ino=12
M.strname='smith'
N.strsex='男'
O.smark=89
P.Sub
Q.ino=12
R.Strname='smith'
S.strsex='男'
T.smark=89

【参考答案】

B
解析:本题考查为记录类型变量student赋值。使用With语句可以对某个对象执行一系列的语句,而不用重复指......

(↓↓↓ 点击下方‘点击查看答案’看完整答案 ↓↓↓)