这段VB代码的意思是什么?每个步骤都是做什么的?麻烦帮忙高手看下~

来源:百度知道 编辑:UC知道 时间:2024/05/18 05:52:40
高手一看就知道着是什么东西了,我就不多说了。代码在下面,帮忙著名下个步骤的都属于什么语句和作用,高分回报 谢谢!!!

Option Explicit

Private StoredValue As Double

Private Const opNone = 0
Private Const opAdd = 1
Private Const opSubtract = 2
Private Const opMultiply = 3
Private Const opDivide = 4
Private Operator As Integer

Private NewEntry As Boolean

' Remove the last character.
Private Sub DeleteCharacter()
Dim txt As String
Dim min_len As Integer

txt = txtDisplay.Text
If Left$(txt, 1) = "-" Then
min_len = 2
Else
min_len = 1
End If

If Len(txt) > min_len Then
txtDisplay.Text = Left$(txt, Len(txt) - 1)
Else
txtDisplay.Text = "0"
End If
End Sub

' Clear the current entry, saved value, and operator.
Private Sub cmdClear_Click()
cmdClearEntry_Click
StoredValue = 0
Operator = opNone
End Sub

' Cl