Our first hands-on this fourth grading was a fortunate event, for me at least. I had the pleasure of having a school PC that's fast and working. It set my mood for Visual Basic work ;)
* * * * *
Debug's Life
Making this quarter's programs was a lot of fun. It was easy enough for me not to give up, yet challenging enough for me not to lose interest. It had the right balance between work and fun. But it also had its share of the downy-dumps, the hitch, the bad side. AKA bugs.
According to Wikipedia, a bug, or specifically a software bug is an error, flaw, mistake, failure, or fault in a computer program that prevents it from behaving as intended (e.g., producing an incorrect or unexpected result). Most bugs arise from mistakes and errors made by people in either a program's source code or its design, and a few are caused by compilers producing incorrect code. That's kind of Pig Latin to me but I'm sure that the bugs I encounter are caused by the errors I made in writing the codes.
Sometimes, when I run the program to test it, a warning appears and the faulty part of the program code is highlighted. That's how I know which part needs correcting.
For the Message and Input Boxes program, I encountered only one bug.
Run-time error '13': Type Mismatch
According to the vbforums.com, a type mismatch happens when one is trying to use the wrong data type, eg: writing a string into a variable which is declared as Integer. I encountered this while making the codes for the seventh and last message box.
For the Math Operator, I came across three bugs. And these are:

Compile Error: Expected End Sub
This happens when there is incorrect syntax. If I remember correctly, this happened when I tried to replace the End Sub with an End If.
Compile Error: Method or data member not found According to edndoc.esri.com, if one attempts to use a property and either forget or misuse the Set keyword, Visual Basic will fail the compilation of the source code with a "method or data member not found" error message.
Compile Error: Block If without End If
Sample:
Private Sub Option2_Click(Index as Integer)
If Index = 0 Then 'Yellow
frmMath.BackColor = RGB(255, 255, 51)
If Index = 1 Then 'Blue
frmMath.BackColor = RGB(0, 51, 255)
If Index = 2 Then 'Violet
frmMath.BackColor = (51, 0, 102)
(and so on...)
According to xtremevbtalk.com, this error happens when there are not enough End If's for the If statements. This happened when I accidentally typed in If instead of ElseIf. This caused the program to have more If statements than End If's.
That's it. I've only encountered four bugs. I know there are many others. And I'm not hoping to have problems with them the next time. I've learned my lesson=]
Labels: english, TLE visual basic