这段程序看不懂,求高人帮忙解释一下,感激不尽 5
DimvAsBooleanDimsAsIntegerDimxAsDoubleDimyAsDoublePrivateSubCommand1_Click(IndexAsInt...
Dim v As Boolean
Dim s As Integer
Dim x As Double
Dim y As Double
Private Sub Command1_Click(Index As Integer)
If Form1.Tag = "s" Then
If Index = 10 Then
Text1.Text = "0."
Else
Text1.Text = Command1(Index).Caption
End If
Form1.Tag = ""
Else
Text1.Text = Text1.Text & Command1(Index).Caption
End If
End Sub
Private Sub Command2_Click(Index As Integer)
Form1.Tag = "s"
If v Then
x = Val(Text1.Text)
v = Not v
Else
y = Val(Text1.Text)
Select Case s
Case 0
Text1.Text = x + y
Case 1
Text1.Text = x - y
Case 2
Text1.Text = x * y
Case 3
If y <> 0 Then
Text1.Text = x / y
Else
MsgBox ("不能以0为除数")
Text1.Text = x
v = False
End If
Case 4
y = 0
v = False
End Select
x = Val(Text1.Text)
End If
s = Index
End Sub 展开
Dim s As Integer
Dim x As Double
Dim y As Double
Private Sub Command1_Click(Index As Integer)
If Form1.Tag = "s" Then
If Index = 10 Then
Text1.Text = "0."
Else
Text1.Text = Command1(Index).Caption
End If
Form1.Tag = ""
Else
Text1.Text = Text1.Text & Command1(Index).Caption
End If
End Sub
Private Sub Command2_Click(Index As Integer)
Form1.Tag = "s"
If v Then
x = Val(Text1.Text)
v = Not v
Else
y = Val(Text1.Text)
Select Case s
Case 0
Text1.Text = x + y
Case 1
Text1.Text = x - y
Case 2
Text1.Text = x * y
Case 3
If y <> 0 Then
Text1.Text = x / y
Else
MsgBox ("不能以0为除数")
Text1.Text = x
v = False
End If
Case 4
y = 0
v = False
End Select
x = Val(Text1.Text)
End If
s = Index
End Sub 展开
1个回答
展开全部
这是MFC里面定义的消息映射,斜杠部分不做解释了,本来就是注释
BEGIN_MESSAGE_MAP(CPApp, CWinApp) //消息映射起始
ON_COMMAND(ID_APP_ABOUT, OnAppAbout) //名字为ID_APP_ABOUT的按钮按下去之后响应OnAppAbout函数
ON_COMMAND(ID_FILE_NEW, CWinApp::OnFileNew) //名字为ID_FILE_NEW的按钮按下去之后响应CWinApp::OnFileNew函数
ON_COMMAND(ID_FILE_OPEN, CWinApp::OnFileOpen)//名字为ID_FILE_OPEN的按钮按下去之后响应CWinApp::OnFileOpen函数
ON_COMMAND(ID_FILE_PRINT_SETUP,CWinApp::OnFilePrintSetup) //名字为ID_FILE_PRINT_SETUP的按钮按下去之后响应CWinApp::OnFilePrintSetup函数
END_MESSAGE_MAP() //消息映射定义结束
本回答被网友采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
杭州一知智能科技有限公司
2022-03-17 广告
2022-03-17 广告
电话机器人主要就是用来模拟人工通话的一组程序,一般由,CRM系统,语义识别,转换文字,话术体系,这是软的部分,再加上底层软交换和通信模块一起,合并起来就是一套完整的电话机器人系统。电话机器人可以代替真人进行电话工作的,像是电话营销、售后回访...
点击进入详情页
本回答由杭州一知智能科技有限公司提供
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询