From the course: Visual Basic Essential Training

Unlock this course with a free trial

Join today to access over 24,500 courses taught by industry experts.

Understand default code flow for an application

Understand default code flow for an application - Visual Basic Tutorial

From the course: Visual Basic Essential Training

Understand default code flow for an application

- [Instructor] When looking at the code in a Visual Basic app's sub-main method, it's straightforward to follow the instructions as they execute sequentially from the top line of code to the bottom line. That's not how code is written in the real world, and it hasn't been for decades. The software industry learned better ways to organize code. In this section, we'll take a quick tour of the kinds of program flow you are likely to encounter in a modern Visual Basic application. In procedural programming, think old-school programming concepts from the early days of coding, programs are written in a linear fashion. The execution would begin at Step A, proceed to Step B, and continue the sequence until the final step. All programming languages include mechanisms to reorder and repeat sections of code. For example, a conditional branch provides two or more possible paths for the program to follow. Depending on the conditions at runtime, the program might execute Steps A, B and D in one…

Contents