栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 面试经验

[单项选择题] 设在工程中定义了下列类型: Type Stutype ino As Integer strname As String*20 strsex As String*1 smark As S

面试经验 更新时间: 发布时间: IT归档 最新发布 模块sitemap 名妆网 法律咨询 聚返吧 英语巴士网 伯小乐 网商动力

[单项选择题] 设在工程中定义了下列类型: Type Stutype ino As Integer strname As String*20 strsex As String*1 smark As S

[单项选择题] 设在工程中定义了下列类型: 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


参考答案:

B

问题解析:

本题考查为记录类型变量student赋值。使用With语句可以对某个对象执行一系列的语句,而不用重复指出对象的名称。其语法如下: With记录类型变量 .记录类型变量成员名=要赋的值 … End With 给记录类型变量中的字符串型成员赋值时要加双引号。
转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/259382.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号