Use block headers to identify blocks
- Last Updated: December 18, 2023
- 1 minute read
- OpenEdge
- Version 13.0
- Documentation
If it is not clear what block the LEAVE
statement applies to, or if you want it to apply to some other enclosing block, you can give a
block a name followed by a colon and then specifically leave that block. This variant of the
procedure has the same effect as the first one:
|
Just to see the effect of specifying a different block, you can try this variant:
|
If you run this code, the AVM leaves the outer FOR
EACH Customer block after retrieving the first Order for the first Customer because of the change to the
LEAVE statement, as shown in the following figure.