随便来个 感觉没什么意义啊=。=
Enum Calc
plus = 1
minus = 2
multiply = 3
divide = 4
End Enum
Function Op_Calculate(Num1 As Double, Num2 As Double, Calc As Byte)
Select Case Calc
Case 1
Op_Calculate = Num1 + Num2
Case 2
Op_Calculate = Num1 - Num2
Case 3
Op_Calculate = Num1 * Num2
Case 4
Op_Calculate = Num1 / Num2
Case Else
Op_Calculate = "err"
End Select
End Function
Enum Calc
plus = 1
minus = 2
multiply = 3
divide = 4
End Enum
Function Op_Calculate(Num1 As Double, Num2 As Double, Calc As Byte)
Select Case Calc
Case 1
Op_Calculate = Num1 + Num2
Case 2
Op_Calculate = Num1 - Num2
Case 3
Op_Calculate = Num1 * Num2
Case 4
Op_Calculate = Num1 / Num2
Case Else
Op_Calculate = "err"
End Select
End Function