Name

Label Keyword

Syntax

label Digits, Identifier, ...;

Description

The label keyword declares one or more labels. A label can be a digit string with up to four digits (as in standard Pascal) or an identifier (an extension to standard Pascal). A label can be used later in the same block to identify a statement as the target of a goto statement. You can also use a label as the target of a JMP instruction in an assembler block. See the goto statement for more information.

Tips and Tricks

In an assembler block, you can avoid declaring your labels by prefacing the label with an at (@) sign. Such labels are local to the subroutine.

See Also

Asm Keyword, Goto Keyword

Get Delphi in a Nutshell now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.