VB Code:
Option Explicit Private Sub Form_Load() Dim np As CNumberProcessor Dim no As cNumberOperator Dim n1 As CNumber Dim n2 As CNumber Set np = New CNumberProcessor Set no = New cNumberOperator n1.Operand.Add 2 n2.Operand.Add 2 no.Operator = "+" np.AddOperator no np.AddOperand n1 np.AddOperand n2 np.Process Debug.Print np.Result End Sub
VB Code:
Option Explicit Private Sub Form_Load() Dim n1 As Long Dim n2 As Long n1 = "2" n2 = "2" Debug.Print n1 + n2 End Sub
I know which way I prefer.
![]()


Reply With Quote

