O'Reilly logo

Start Here!™ Fundamentals of Microsoft® .NET Programming by Rod Stephens

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Jumping Statements

The control statements described so far make a program jump to various pieces of code. Depending on conditions, the program may jump to a particular code block or jump over other code blocks.

The statements are intuitive, so the jumps are easy to understand—and in fact, it’s easy to understand a While loop without even thinking about the fact that the loop makes the program jump from the end of the loop to the beginning.

Many programming languages provide a few less structured ways to let a program jump from one place to another. The least structured of these is the Go To statement.

Go To

The Go To statement makes the program immediately jump to an arbitrary line of code. The pseudocode for a Go To statement looks like the following: ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required