首页
外语
计算机
考研
公务员
职业资格
财经
工程
司法
医学
专升本
自考
实用职业技能
登录
计算机
设有如下通用过程: Public Function Fun(xStr As String)As String Dim tStr As String, strL As Integer tStr="" strL=Len(xStr) i=
设有如下通用过程: Public Function Fun(xStr As String)As String Dim tStr As String, strL As Integer tStr="" strL=Len(xStr) i=
admin
2015-08-28
32
问题
设有如下通用过程:
Public Function Fun(xStr As String)As String
Dim tStr As String, strL As Integer
tStr=""
strL=Len(xStr)
i=1
Do While i<=strL / 2
tStr=tStr & Mid(xStr, i, 1)& Mid(xStr, strL-i+1, 1)
i=i+1
Loop
Fun=tStr
End Function
在窗体上画一个名称为Command1的命令按钮。然后编写如下的事件过程:
Private Sub Command1_Click()
Dim S1 As String
S1="abcdef"
Print UCase(Fun(S1))
End Sub
程序运行后,单击命令按钮,输出结果是( )。
选项
A、ABCDEF
B、abcdef
C、AFBECD
D、DEFABC
答案
C
解析
通用过程Fun的主要功能在于
转载请注明原文地址:https://kaotiyun.com/show/QYQp777K
本试题收录于:
二级VB题库NCRE全国计算机二级分类
0
二级VB
NCRE全国计算机二级
相关试题推荐
在VB集成环境中要结束一个正在运行的工程,可单击工具栏上的一个按钮,这个按钮是
(1)在窗体Forml上画一个命令按钮,名称为Command1,标题为“打开文件”,在窗体上添加适当的控件并编写适当的程序代码,要求程序运行时,单击“打开文件”命令按钮,可以弹出“打开文件”对话框。程序运行时的窗体界面如图5—1所示。注意:保存时
请根据以下各小题的要求设计VisualBasic应用程序(包括界面和代码)。(1)在考生文件夹下有工程文件sj3.vbp及窗体文件sj3.frm,该程序是不完整的。在窗体中有3个滚动条,名称分别为VScrolll、VScroll2和VScrol
(1)在名称为Forml的窗体上建立一个名称为P1的图片框和两个命令按钮,名称分别为Cmdl和Cmd2,标题分别为“输出”和“清除”,如图22—1所示。要求程序运行后,每单击一次“输出”按钮,不使用任何变量而直接在图片框中显示小写字母“loadme’’;
运行以下程序后,显示的结果为______。Dimx(5)x(0)=1Fori=1To5x(i)=x(i-1)*iPrintx(i)NextiEnd
下列关于多重窗体程序的叙述中,错误的是()。
关于多行结构条件语句的执行过程,正确的说法是()。
结构化分析方法是面向______进行分析的方法。
符号%是声明______类型变量的类型定义符。
随机试题
SpeechforVisitorstotheMuseum1.Historyofthemuseum.Waterandavailabilityofrawmaterial—madethesitesuitab
RNA聚合酶全酶识别启动子的位置在
运用价值工程优化设计方案所得结果是:甲方案价值系数为1.36,单方造价1200元,重要系数0.3215;乙方案价值系数为1.28,单方造价1250元,重要系数0.2132;丙方案价值系数为1.15,单方造价1230元,重要系数0.2886;丁方案价值系数
我国执行的GB/T19001--2000质量管理体系标准中,质量管理原则包括八个方面,其中,将活动和相关资源作为过程进行管理,可以更高效地得到期望的结果体现了()的原则。
下列项目中,属于进口货物关税完税价格组成部分的是()。
在基础货币中,中央银行控制力最强的是()。
6枚一角硬币叠在一起与5枚五角硬币一样高,6枚五角硬币叠在一起与5枚一元硬币一样高。如果分别用一角、五角、一元硬币叠成三个一样高的圆柱,这些硬币的币值为87.元,那么三种硬币总共多少枚?
从所给的四个选项中,选择最合适的一个填入问号处,使之呈现一定的规律性。
管理信息系统的功能可按应用划分若干层次,其中面向战术层的功能为
数据库设计的四个阶段是:需求分析、概念设计、逻辑设计和
最新回复
(
0
)