Use multiple weak-scoped references in a single block
- Last Updated: December 20, 2023
- 2 minute read
- OpenEdge
- Version 13.0
- Documentation
DO block, you can inspect the buffer
scoping:
|
The DO block itself does not scope any records. The FOR
EACH block and the REPEAT PRESELECT EACH block each scope
the Bin record with a weak scope. This is okay, and the
Bin buffer is scoped to each of these two blocks in turn.
The final block of code walks through the list of best Warehouses for
this Order’s items. At this point the cBestList
variable holds a list of numbers for each Warehouse. Each number is the
count of Items where that Warehouse has an inventory
at least 100 better than the next best Warehouse. This block checks
whether there is a Warehouse that is the best for either all or all but
one of the Items. If so, you find that Warehouse
record and save off the WarehouseName to pass back. By now all the
statements and functions in this block should be familiar to you.
To end the procedure, use the following code:
|
This procedure is a little complicated, but these examples show how the different block types interact and how to use some of the built-in functions listed in Use Basic ABL Constructs.