Labeled Statements

From RAD Studio
Jump to: navigation, search

Go Up to Statements Index

A statement can be labeled in two ways:

label-identifier : statement


The label identifier serves as a target for the unconditional goto statement. Label identifiers have their own name space and have function scope. In C++ you can label both declaration and non-declaration statements.

case constant-expression : statement
                 default : statement

сase and default labeled statements are used only in conjunction with switch statements.