VB,运行下面程序,单击窗体上的命令按钮Command1,则在窗体上显示的第一行内容是? ,窗体上最后一行显示?
运行下面程序,单击窗体上的命令按钮Command1,则在窗体上显示的第一行内容是,()窗体上最后一行显示的内容是()。PrivateSubCommand1_Click()...
运行下面程序,单击窗体上的命令按钮Command1,则在窗体上显示的第一行内容是 ,( )窗体上最后一行显示的内容是( ) 。
Private SubCommand1_Click()
Dim S As String
S = "LAUSIV"
Text1.Text = Display(S, Len(S))
End Sub
Private FunctionDisplay(S As String, L As Integer) As String
If L > 1 Then Display = Display(S, L -1)
S = Left(S, L - 1) & Right(S, 1) &Mid(S, L, Len(S) - L)
Display = S
Print Display
End Function 展开
Private SubCommand1_Click()
Dim S As String
S = "LAUSIV"
Text1.Text = Display(S, Len(S))
End Sub
Private FunctionDisplay(S As String, L As Integer) As String
If L > 1 Then Display = Display(S, L -1)
S = Left(S, L - 1) & Right(S, 1) &Mid(S, L, Len(S) - L)
Display = S
Print Display
End Function 展开
2个回答
展开全部
窗体上显示的第一行内容是 (VLAUSI ),窗体上最后一行显示的内容是(VISUAL)
Private Function Display(S As String, L As Integer) As String
If L > 1 Then Display = Display(S, L -1)
S = Left(S, L - 1) & Right(S, 1) &Mid(S, L, Len(S) - L)
Display = S
Print Display
End Function
Display = Display(S, L -1) 是过程的递归调用。
Private Function Display(S As String, L As Integer) As String
If L > 1 Then Display = Display(S, L -1)
S = Left(S, L - 1) & Right(S, 1) &Mid(S, L, Len(S) - L)
Display = S
Print Display
End Function
Display = Display(S, L -1) 是过程的递归调用。
本回答被网友采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询