Errors
In computer jargon, an error is referred to as a bug. [2] Errors can be grouped into three types based on when they occur—design time, compile time, or run time.
Design-Time Errors
As the name implies, a design-time error occurs during the writing of code. Perhaps the nicest feature of the Visual Basic Editor is that it can be instructed to watch as we type code and stop us when we make a syntax error. This automatic syntax checking can be enabled or disabled in the Options dialog box shown in Figure 4-3, but I strongly suggest that you keep it enabled.
Notice also that there are other settings related to the design-time environment, such as how far to indent code in response to the Tab key.

Figure 4-3. The Options dialog box
To illustrate automatic syntax checking, Figure 4-4 shows what happens when we deliberately enter the syntactically incorrect statement x == 5 and then attempt to move to another line. Note that Microsoft refers to this type of error as a compile error in the dialog box, and perhaps we should as well. However, it seems more descriptive to call it a design-time error or just a syntax error.

Figure 4-4. A syntax error message
Compile-Time Errors
Before a program can be executed, it must be compiled, or translated into a language that the computer can understand. (This ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access